-
Notifications
You must be signed in to change notification settings - Fork 54
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
Added label_wrapper_tags #73
Conversation
I may be wrong but this is not doing exactly what |
@rafaelfranca |
|
I mean, could you explain why using: a.label :name, l_wrapper_tags: :h2 instead of: content_tag :h2 do
a.label :name
end Not saying that your feature is not useful, I'm just trying to understand how it is useful. Thank you for the pull request ❤️ |
That's a point. I've been developing in rails for 2 weeks and I don't know all the stuff of course. |
Also I've modified the version... If it is a problem don't merge it, if you will ever merge it :DD |
I believe the best thing to do is to use normal Rails helpers. It is easier to understand without even having to search what means |
That works fine if you don't have to write something like this: content_tag :h2 do
a.label :name
a.attribute :name, label: nil # or false if you want
end because this would wrap also the attribute into a h2 if you try to resolve that by writing this: content_tag :h2 do
a.label :name
end
a.attribute :name, label: nil # or false if you want this won't write the label into the whole content wrapper. |
I'm happy leaving the helpers generation for Rails, Show For already handles a single wrapper which is a good default, everything else can be done by helpers/Rails. Thanks for your pull request. ❤️ |
I think that the readme is self-explanatory