This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Lecture < ActiveRecord::Base | |
# to be able to like courses | |
include Diaspora::Likeable | |
# to be able to like courses | |
include Diaspora::Commentable | |
# asscoiation with other new modules | |
belongs_to :courses |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Enrollment < ActiveRecord::Base | |
# associate lectures with courses | |
belongs_to :course | |
# associate lectures with people | |
belongs_to :person | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# associate people with courses through enrollment | |
has_many :enrollments | |
has_many :courses, :through => :enrollments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run first | |
rails g controller Courses | |
# and then | |
rails g controller Lectures |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%h1 List of Courses | |
/ And in the second file | |
%h1 List of Lectures |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add routes | |
resources :courses | |
resources :lectures |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rails server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**********************************************/ | |
/* | |
/* IR_Black Skin by Ben Truyman - 2011 | |
/* | |
/* Based on Todd Werth's IR_Black: | |
/* http://blog.toddwerth.com/entries/2 | |
/* | |
/* Inspired by Darcy Clarke's blog post: | |
/* http://darcyclarke.me/design/skin-your-chrome-inspector/ | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**********************************************/ | |
/* | |
/* Darker Skin by Darcy Clarke - 2011 | |
/* | |
/* For how to install, or more themes, check out: | |
/* http://darcyclarke.me/design/skin-your-chrome-inspector/ | |
/* | |
/* Color scheme is based on Joe Bergantine's Specials Board: | |
/* http://joebergantine.com/werkstatt/seestyle | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Additional styles for Chrome Inspector; should be used with | |
http://darcyclarke.me/design/skin-your-chrome-inspector/ | |
and | |
http://dpaste.com/hold/595890/ | |
*/ | |
#elements-content li.hovered:not(.selected) .selection { | |
/* hover color */ | |
background: rgba(255, 255, 255, .2) !important; | |
} | |
#elements-content .selection.selected { |