Skip to content

Instantly share code, notes, and snippets.

Created October 10, 2016 08:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/a0c63e46da467bf7ab31551f9697c545 to your computer and use it in GitHub Desktop.
Save anonymous/a0c63e46da467bf7ab31551f9697c545 to your computer and use it in GitHub Desktop.
class BaseModel
@user_visible_fields = [:id]
@user_editable_fields = []
attr_accessor :user_visible_fields,:user_editable_fields
end
class User < BaseModel
@user_visible_fields += [:user_name]
@user_editable_fields += [:user_name]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment