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
Split RecordTagHelper into a gem and remove from Rails #18337
Comments
I can take a look at this if no one else was planning on taking it. |
Please do, Todd!
|
@dhh Taking a quick look, it looks like the only place |
I’ve used #dom_id a bunch. That seems like the right level of abstraction. div_for and content_for went too high. So let’s keep that in.
|
👍 |
David, I've seen |
I'm not a fan of it. It seems anemic to me over just doing something like |
Well, technically it does add both content_tag_for :div, @posts do/end
# which would be something like:
@posts.each do |post|
content_tag :div, id: dom_id(post), class: dom_class(post) do/end
end If you still feel skeptical about having it in core then I think I have no more arguments on this, other than extracting to a gem in case people want it back while upgrading :). |
I don’t like the look of that as it is. I remain 👍 on going gem on it.
|
David, do you think it should initially live under the rails org or the author could manage the extracted gem under its user (and we would document it on release notes and so on, of course)? |
I think traditionally, we’ve had the gem live under rails. That seems fine to continue.
|
👍 |
👍 for rails organization. If author want to manage the release and the repository it is fine, we can give him the access, as long we can do also. BTW, the copyright should still be the same as Rails since it an extraction of code (of course with proper attribution to the current author). |
I'll commit to maintaining the gem moving forward - just let me know how you guys would prefer to handle that. As far as copyrights and things go, I can take care of the LICENSE file as that was just auto-generated by GitHub, but I'd also like some feedback on author attribution in the gemspec - I just put all my own information in there for now as placeholders. Alternatively, if someone would like to take care of those updates themselves, I'd be more than happy to add them as a contributor on the temporary repo. |
@rafaelfranca Any more thoughts on author attribution? |
Hey all - just wanted to loop back on this. Let me know how I should proceed. |
@todd of course the author attribution is fine. The capyright too, you just need to keep the original author and copyright attribution. |
@rafaelfranca Original author being DHH or someone else? To clarify, I only need to change that in LICENSE? |
Original author is David. And gemspec and licence needs to be changed On Thu, Jan 29, 2015, 22:11 Todd Bealmear notifications@github.com wrote:
|
@rafaelfranca Ok, I took care of both of those files. |
Closed by #18411 |
`content_tag_for` has been deprecated in rails 5: rails/rails#18337 So this: ```erb <%= content_tag_for(:li, @projects) do |project| %> <!-- display a project --> <% end %> ``` should now be this: ```erb <% @projects.each do |project| %> <%= content_tag(:li, id: dom_id(project)) do %> <!-- display a project --> <% end %> <% end %> ``` `dom_id` will use the same ID that content_tag_for used to.
Rails 5 removed the view helper `#content_tag_for` and moved it into the record_tag_helper gem. This adds support back to Rails 5 for `#content_tag_for`. rails/rails#18337
Rails 5 removed the view helper `#content_tag_for` and moved it into the record_tag_helper gem. This adds support back to Rails 5 for `#content_tag_for`. rails/rails#18337
I remember adding RecordTagHelper as an experiment, but never felt happy with its use in real life. Let's kick it out in a gem and remove it from core.
The text was updated successfully, but these errors were encountered: