Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using deprecated includes for check_box and check_box_tag #450

Open
jaywhy opened this issue Nov 16, 2024 · 1 comment
Open

Using deprecated includes for check_box and check_box_tag #450

jaywhy opened this issue Nov 16, 2024 · 1 comment

Comments

@jaywhy
Copy link

jaywhy commented Nov 16, 2024

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
@marcoroth
Copy link
Owner

marcoroth commented Nov 19, 2024

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 #447 merged this should be resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants