Module: Card::Set::Type::File::SelectedAction

Included in:
Card::Set::Type::File, Image
Defined in:
card/tmpsets/set/mod014-card-mod-carrierwave/type/file.rb,
card/tmpsets/set/mod013-card-mod-carrierwave/type/file.rb

Instance Method Summary collapse

Instance Method Details

#last_content_action_idObject



17
18
19
20
21
# File 'card/tmpsets/set/mod014-card-mod-carrierwave/type/file.rb', line 17

def last_content_action_id
  return super if temporary_storage_type_change?
  # find action id from content (saves lookups)
  db_content.to_s.split(%r{[/\.]})[-2]
end

#select_action_by_params(params) ⇒ Object



11
12
13
14
15
# File 'card/tmpsets/set/mod014-card-mod-carrierwave/type/file.rb', line 11

def select_action_by_params params
  # skip action table lookups for current revision
  rev_id = params[:rev_id]
  super unless rev_id && rev_id == last_content_action_id
end