Is there anything like Grails taglibs for Ruby on Rails?
I have a few months of experience with Ruby on Rails and really loved it from the beginning on. Now, for work, I was asked to code in Grails and although I first had some objections, I now think it's a very decent framework.
One thing that really impressed me in Grails are Taglibs because they make frontend modularity so much easier.开发者_如何学编程
I would really like to do something with Rails.
- Is there anything like Taglibs for Rails?
- If not, what are the best practices for accomplishing this kind of view modularity (and, in essence, making my life easier)?
You can build your own helpers and the views can access those helpers. Take as an example formtastic, which provides extra methods/tags to build forms.
Strictly speaking, formtastic is a rails plugin, but it follows the same principles.
精彩评论