Module: AttrRemote::InstanceMethods
- Defined in:
- lib/attr_remote.rb
Class Method Summary collapse
Instance Method Summary collapse
- #remote_attributes_changed? ⇒ Boolean
-
#save_with_dirty_remote(*args) ⇒ Object
:nodoc:.
-
#save_with_dirty_remote!(*args) ⇒ Object
:nodoc:.
Class Method Details
.included(base) ⇒ Object
167 168 169 170 |
# File 'lib/attr_remote.rb', line 167 def self.included(base) base.alias_method_chain :save, :dirty_remote base.alias_method_chain :save!, :dirty_remote end |
Instance Method Details
#remote_attributes_changed? ⇒ Boolean
172 173 174 |
# File 'lib/attr_remote.rb', line 172 def remote_attributes_changed? @remote_attributes_changed == true end |
#save_with_dirty_remote(*args) ⇒ Object
:nodoc:
176 177 178 179 180 181 |
# File 'lib/attr_remote.rb', line 176 def save_with_dirty_remote(*args) #:nodoc: if status = save_without_dirty_remote(*args) @remote_attributes_changed = false end status end |
#save_with_dirty_remote!(*args) ⇒ Object
:nodoc:
182 183 184 185 186 |
# File 'lib/attr_remote.rb', line 182 def save_with_dirty_remote!(*args) #:nodoc: status = save_without_dirty_remote!(*args) @remote_attributes_changed = false status end |