Class: Marty::ApiConfigView
- Defined in:
- app/components/marty/api_config_view.rb
Constant Summary
Constants included from Permissions
Instance Method Summary collapse
Methods inherited from Grid
#child_components, #class_can?, #configure_form_window, #get_json_sorter, #has_search_action?, #initialize, #linked_components
Methods included from Permissions
#can_call_endpoint?, #can_perform_action?, #can_perform_actions, #current_user_roles, extended, #has_any_perm?, #has_marty_permissions, #has_perm?
Constructor Details
This class inherits a constructor from Marty::Grid
Instance Method Details
#configure(c) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'app/components/marty/api_config_view.rb', line 7 def configure(c) super c.model = Marty::ApiConfig c.title = 'API Config' c.attributes = [ :script, :node, :attr, :api_class, :logged, :input_validated, :output_validated, :strict_validate, :created_at, :updated_at, ] c.paging = :pagination c.editing = :in_form c.store_config.merge!( sorters: [ { property: :script, direction: :ASC }, { property: :node, direction: :ASC }, { property: :attr, direction: :ASC }, { property: :api_class, direction: :ASC }, ]) @model = c.model end |
#default_form_items ⇒ Object
86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'app/components/marty/api_config_view.rb', line 86 def default_form_items [ :script, :node, :attr, :api_class, :logged, :input_validated, :output_validated, :strict_validate, ] end |