Beginning RubyOnRails: The view layer helpers
One thing I’ve found great in the Rails framework API is that provides a lot of built-in classes and methods to help coding a page, and once you know a little about them, they are very useful.
An example of this is the ActionView::Helpers::DateHelper module, who provides date methods for the presentation layer, its very useful to accelerate the view construction.
One of my favourites is the date_select method that let you create a date combo-style drop down with many options, and it support the disabled property too!
So look at this example:
date_select ('one_object', 'the_method', :disabled => true)
Yep, and now you have a drop down combo box with endless dates in your page!, it really improves programmers coding speed, isnt it?
No comments:
Post a Comment