Module: ActiveApi::SingletonMethods
- Included in:
- ApiObject
- Defined in:
- lib/api_object.rb
Instance Method Summary collapse
Instance Method Details
#api_association(*args) ⇒ Object
156 157 158 159 160 |
# File 'lib/api_object.rb', line 156 def api_association (*args) = args. self.columns.merge!(args[1] => args[0]) if args.length >= 2 self.assoc.merge!(args[0] => [:as]) unless [:as].nil? end |
#api_column(column_name, api_name) ⇒ Object
152 153 154 |
# File 'lib/api_object.rb', line 152 def api_column column_name, api_name self.columns.merge!(api_name => column_name) end |