Search
Categories
- Deployment (4)
- Development (63)
- Gems and Plugins (4)
- News (2)
- Projects (4)
- Testing (3)
Most Popular Tags
activerecord architecture collections css database date and time debugging design design patterns DRY ebooks fixtures floating-point numbers formatting framework front page global variables helpers I18n introductory launchpad meta-information migrations model multiplicity mvc MySQL partials production rails 2.0 rails 2.1 Rails 2.2 regular expressions routing rss ruby security setup sql UI upgrading user management validation xml xml builder
Tag Archives: helpers
Easy Form Drop-Downs With Collection_Select
You have a sales-agent model that has a customer. You want a drop-down selection of all customers in the system, and you want to assign the customer ID to the sales agent. How do you do this? Rails has a collection_select helper for this–you pass in the model instance name, the collection, the ID field, the display field, and Rails handles the rest! Continue reading
Image_Tag and Link_To Helpers
All websites face an issue of: how can I refer to my images in a way that won’t break if I move my site to a new location? Image_Tag helper to the rescue! Similarly, how can you write links to specific controllers and actions, so that if you change things around, the site won’t break? Link_To to the rescue! These helpers provide simple, easy-to-use functionality to help keep your site DRY. Continue reading