Class: Marty::Notifications::GridView
- Defined in:
- app/components/marty/notifications/grid_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
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/components/marty/notifications/grid_view.rb', line 9 def configure(c) super c.header = false c.model = 'Marty::Notifications::Delivery' c.attributes = [:created_at, :notification__event_type, :text, :error_text] c.store_config.merge!( sorters: [{ property: :created_at, direction: 'DESC' }], page_size: 30 ) c.scope = ->(arel) { arel.includes(:notification) } end |
#default_bbar ⇒ Object
33 34 35 |
# File 'app/components/marty/notifications/grid_view.rb', line 33 def [] end |
#get_records(params) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'app/components/marty/notifications/grid_view.rb', line 23 def get_records(params) model.where( delivery_type: :web, state: [:sent, :delivered], recipient_id: Mcfly.whodunnit ).scoping do super end end |