phlexing
phlexing copied to clipboard
Using deprecated includes for check_box and check_box_tag
Phlex deprecated the Checkbox and CheckboxTag modules in Phlex 1.2.0. There are now camel-cased: CheckBox and CheckBoxTag.
https://github.com/phlex-ruby/phlex-rails/releases/tag/1.2.0
ERB Input:
<%= form_for do |f| %>
<%= f.check_box %>
<%= check_box_tag %>
<% end %>
Output:
class Component < Phlex::HTML
include Phlex::Rails::Helpers::Checkbox
include Phlex::Rails::Helpers::CheckboxTag
include Phlex::Rails::Helpers::FormFor
def view_template
form_for do |f|
plain f.check_box
check_box_tag
end
end
end
Expected output:
class Component < Phlex::HTML
include Phlex::Rails::Helpers::CheckBox
include Phlex::Rails::Helpers::CheckBoxTag
include Phlex::Rails::Helpers::FormFor
def view_template
form_for do |f|
plain f.check_box
check_box_tag
end
end
end
Thanks for opening this @jaywhy! The code for figuring this out is all dynamic, but we are using an older version of Phlex to figure out the modules.
I think if we can get https://github.com/marcoroth/phlexing/pull/447 merged this should be resolved