Show: All | News Items | Blog Posts
Dynamic Select Menus in Rails using Observe_Field
Mar 16, 2010 by Charlie
I frequently find myself building forms which contain dynamic select menus. This means that a user selects a choice from one menu, and that choice populates options into a second menu. An example of this might be a scenario where the user selects their state from a drop-down menu, then selects their city from a second menu. We only want that second menu to contain citie...
Jan 21, 2009 by Travis
I started wondering a few days ago, "Why don't we have an iPhone version of the Plexus site?" So I did some research and found that enabling a Ruby on Rails site for the iPhone was easier than I thought. I found a great tutorial outlining how to create a custom mime-type and create iPhone-specific pages. I took advantage of a few tools to make my job a bit easier. i...
Form Validation vs. Correction in Rails
Dec 17, 2008 by Charlie
Developers have a great deal of control over a web user's experience, and when it comes to validating input forms, opportunities to make things smoother for the user are something every good developer should think about. For example, I am working on a project right now where users can enter the URL of a link into the database-driven content. In order for the link to ...
Piggybacking on link_to_unless
Aug 26, 2008 by Colin
We needed to add CSS to HTML links based on certain conditions (for instance, if you're already there). That's pretty easy to do by using link_to_unless, but the easy way isn't very DRY (Don't Repeat Yourself): <%= link_to_unless(@current_controller=='faq', "Frequently Asked Questions", faq_path){ link_to("Frequently Asked Questions", faq_path, :class =...
Jun 26, 2008 by Colin
This blog of mine is quickly becoming an encyclopedia of all the crazy problems that can happen if you're not careful. I'll have to do some more right-brained thinking for my next entry... At any rate, if you've been using Rails with MySQL, there's a hair-pulling problem you may run across when generating a new project from scratch, now that Rails 2.0 has SQLite3 as...