Skip to content

Instantly share code, notes, and snippets.

@eduardordm
Created July 27, 2011 00:29
Show Gist options
  • Save eduardordm/1108424 to your computer and use it in GitHub Desktop.
Save eduardordm/1108424 to your computer and use it in GitHub Desktop.
#rubyonrails
class User < ActiveRecord::Base
has_many :actions
end
class Actions < ActiveRecord::Base
belongs_to :movie
belongs_to :user
# add a scope called twitted - it's just a where!!!
end
class Movie < ActiveRecord::Base
has_many :actions
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment