Skip to content

Instantly share code, notes, and snippets.

@ahmdrefat
Created April 23, 2012 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmdrefat/2471135 to your computer and use it in GitHub Desktop.
Save ahmdrefat/2471135 to your computer and use it in GitHub Desktop.
course model
class Course < ActiveRecord::Base
# to be able to tag courses and find them by their tags
include Diaspora::Taggable
# to be able to like courses
include Diaspora::Likeable
# to be able to add comments on courses
include Diaspora::Commentable
# asscoiation with other new modules
has_many :enrollments
has_many :people, :through => :enrollments
has_many :lectures
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment