Class: CmAdmin::Models::CustomAction

Inherits:
Action
  • Object
show all
Defined in:
lib/cm_admin/models/custom_action.rb

Constant Summary

Constants inherited from Action

Action::VALID_SORT_DIRECTION

Instance Attribute Summary

Attributes inherited from Action

#action_type, #child_records, #code_block, #display_if, #display_type, #icon_name, #is_nested_field, #layout, #layout_type, #name, #nested_table_name, #page_description, #page_title, #parent, #partial, #path, #redirection_url, #route_type, #sort_column, #sort_direction, #verb

Class Method Summary collapse

Methods inherited from Action

#controller_action_name, #initialize, #set_default_values, #set_values

Methods included from Actions::Blocks

#set_layout, #set_partial, #set_title

Constructor Details

This class inherits a constructor from CmAdmin::Models::Action

Class Method Details

.find_by(model, search_hash) ⇒ Object



7
8
9
# File 'lib/cm_admin/models/custom_action.rb', line 7

def find_by(model, search_hash)
  model.available_actions.find { |i| i.name == search_hash[:name] }
end