Class: Marty::NewPostingForm

Inherits:
Form
  • Object
show all
Extended by:
Permissions
Defined in:
app/components/marty/new_posting_form.rb

Constant Summary

Constants included from Permissions

Permissions::NETZKE_ENDPOINTS

Instance Method Summary collapse

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?

Instance Method Details

#configure(c) ⇒ Object



25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'app/components/marty/new_posting_form.rb', line 25

def configure(c)
  super

  c.model = 'Marty::Posting'
  c.items = [
    {
      name: :posting_type__name,
      scope: lambda { |r|
        r.where(name: Marty::NewPostingForm.can_perform_actions)
      },
    },
    :comment,
  ]
end