Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class User < ActiveRecord::Base
- def apps(*args)
- if developer?
- ActiveRecord::Base::User.has_many :apps
- else
- raise(NoMethodError, "Only developers get creations.")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement