Class: Ankoder::Account
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
count, create, #destroy, destroy, destroy_all, disconnect!, establish_connection!, #include_ankoder_object, #initialize, method_missing, #method_missing, path, path=, #save, #save!, session, session=, update
Constructor Details
This class inherits a constructor from Ankoder::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Ankoder::Base
Class Method Details
Instance Method Details
#id ⇒ Object
24 25 26 |
# File 'lib/ankoder/account.rb', line 24 def id "" end |
#new_record? ⇒ Boolean
3 4 5 |
# File 'lib/ankoder/account.rb', line 3 def new_record? false end |
#reload ⇒ Object
20 21 22 |
# File 'lib/ankoder/account.rb', line 20 def reload @attributes = Account.find.attributes end |
#update_attributes(attributes = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/ankoder/account.rb', line 7 def update_attributes(attributes={}) attributes.delete "account" attributes.keys.each do |k| attributes.merge!("user[#{k.to_s}]" => attributes[k]) attributes.delete k end if Account.update(id, attributes) reload true end end |