Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def self.check_field(name)
- define_method(name) do
- if object.privacy.include?(name.to_s)
- false
- else
- super()
- end
- end
- end
- check_field :first_name
- check_field :last_name
- check_field :email
- check_field :birthday
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement