Show: All | News Items | Blog Posts
There are no news releases with that tag.
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...
undefined method `last' for {}:Hash
Feb 22, 2008 by Colin
Sometimes you hate the things that make your life so easy, because you have some problems with those things that make it temporarily more difficult. But then you fix the problems, and everything's back to being cool again. In this case, I'm using Engines with Ruby on Rails, and there seems to be a conflict between my version of rake and my version of engines. So I ...
View all Blog Posts tagged with rails »