Module: SelectableAttrRails::DbLoadable
- Defined in:
- lib/selectable_attr_rails/db_loadable.rb
Defined Under Namespace
Modules: Entry, InstanceMethods
Instance Method Summary collapse
Instance Method Details
#update_by(*args, &block) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/selectable_attr_rails/db_loadable.rb', line 3 def update_by(*args, &block) = args.last.is_a?(Hash) ? args.pop : {} = {:when => :first_time}.update() @sql_to_update = block_given? ? block : args.first @update_timing = [:when] self.extend(InstanceMethods) unless respond_to?(:update_entries) end |