app/helpers/agilibox/form_helper.rb in agilibox-1.11.0 vs app/helpers/agilibox/form_helper.rb in agilibox-2.0.0
- old
+ new
@@ -1,11 +1,11 @@
module Agilibox::FormHelper
include Agilibox::I18nHelper
# Hidden submit to be the default triggered on <enter> keypress on a form
def form_hidden_submit
- tag(:input, type: "submit", class: "hidden-submit")
+ tag.input(type: "submit", class: "hidden-submit")
end
def form_buttons(opts = {})
back_url = opts[:back_url]
back_url = url_for(:back).html_safe if back_url.nil?
@@ -34,23 +34,23 @@
submit + cancel
end
end
- def horizontal_form_for(obj, opts = {}, &block)
+ def horizontal_form_for(obj, opts = {}, &)
opts = {
:wrapper => "horizontal_form",
:html => {
:class => "form-horizontal",
},
}.deep_merge(opts)
- simple_form_for(obj, opts, &block)
+ simple_form_for(obj, opts, &)
end
def search_form(action: request.fullpath)
- render "agilibox/search/form", action: action
+ render "agilibox/search/form", action:
end
def checkboxes_dropdown(f, input, collection, label = t("actions.select"))
render("agilibox/forms/checkboxes_dropdown",
:f => f,
@@ -65,8 +65,8 @@
.with_indifferent_access
.except(*except)
return if query_values.empty?
- query_values.sum { |k, v| tag.input(type: "hidden", name: k, value: v) }
+ query_values.sum("".html_safe) { |k, v| tag.input(type: "hidden", name: k, value: v) }
end
end