Created
October 5, 2013 04:53
-
-
Save compactcode/6836813 to your computer and use it in GitHub Desktop.
Whats a good way to ensure that that the user assign to a site belongs to the same account?
This file contains hidden or 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 Site < ActiveRecord::Base | |
belongs_to :account | |
belongs_to :user | |
end |
This file contains hidden or 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 User < ActiveRecord::Base | |
belongs_to :account | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment