Module: Card::Set::Type::File::SelectedAction
- Included in:
- Card::Set::Type::File, Image
- Defined in:
- platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb
Overview
sheared method for action identification
Instance Method Summary collapse
Instance Method Details
#last_content_action_id ⇒ Object
18 19 20 21 22 |
# File 'platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb', line 18 def last_content_action_id # find action id from content (saves lookups) aid = db_content.to_s.split(%r{[/.]})[-2] aid.number? ? aid.to_i : nil end |
#select_action_by_params(params) ⇒ Object
12 13 14 15 16 |
# File 'platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb', line 12 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 |