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.
13 lines
421 B
Plaintext
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 %>
|