Module: ActiveShrine::Model
- Extended by:
- ActiveSupport::Concern
- Includes:
- Reflection::ActiveRecordExtensions
- Defined in:
- lib/active_shrine/model.rb
Overview
Provides the class-level DSL for declaring an Active Record model’s attachments.
Instance Method Summary collapse
-
#changed_for_autosave? ⇒ Boolean
:nodoc:.
-
#initialize_dup ⇒ Object
:nodoc:.
-
#reload ⇒ Object
:nodoc:.
-
#shrine_attachment_changes ⇒ Object
:nodoc:.
Instance Method Details
#changed_for_autosave? ⇒ Boolean
:nodoc:
186 187 188 |
# File 'lib/active_shrine/model.rb', line 186 def changed_for_autosave? # :nodoc: super || .any? end |
#initialize_dup ⇒ Object
:nodoc:
190 191 192 193 194 |
# File 'lib/active_shrine/model.rb', line 190 def initialize_dup(*) # :nodoc: super @active_shrine_attached = nil @shrine_attachment_changes = nil end |
#reload ⇒ Object
:nodoc:
196 197 198 |
# File 'lib/active_shrine/model.rb', line 196 def reload(*) # :nodoc: super.tap { @shrine_attachment_changes = nil } end |
#shrine_attachment_changes ⇒ Object
:nodoc:
182 183 184 |
# File 'lib/active_shrine/model.rb', line 182 def # :nodoc: @shrine_attachment_changes ||= {} end |