Files
grecia/app/views/admin/legislation/proposals/_select_proposal.html.erb
Javi Martín 667c2c82b5 Use toggle_select action for legislation proposals
The `update` action is usually expected to behave the same way it does
everywhere else, which is updating a record using the `params` hash.

The name `toggle_select` comes from the name we use in a similar
situation for budget investments.
2018-10-04 16:29:01 +02:00

13 lines
421 B
Plaintext

<% if proposal.selected?
button_text = t("admin.legislation.proposals.index.selected")
clas = 'button expanded'
else
button_text = t("admin.legislation.proposals.index.select")
clas = 'button hollow expanded'
end %>
<%= link_to button_text,
toggle_selection_admin_legislation_process_proposal_path(proposal.process, proposal),
method: :patch,
class: clas %>