SHARE
TWEET

Marcos Zanona

a guest Sep 1st, 2009 59 Never
  1. class User < ActiveRecord::Base
  2.   def apps(*args)
  3.     if developer?
  4.       ActiveRecord::Base::User.has_many :apps
  5.     else
  6.       raise(NoMethodError, "Only developers get creations.")
  7.     end
  8.   end
  9. end
RAW Paste Data
Top