Posts tagged rails

Aug18

States and provinces for Rails' grouped_options_for_select

webdev rails | comments

My company was needing a state drop down in a Rails app to record license plate states. As a higher-education institution, there is the possibility of Canadian and Mexican vehicles as well. Not finding a Rails-ready hash for the grouped_options_for_select method, I converted an HTML version to a Rails-ready version for my reference and perhaps the benefit of others.

Continue reading »

Aug05

Ruby vs. MySQL (or, the day I learned about Benchmark)

ruby rails | comments

I was writing a small Rails app for work to allow faculty and students to sign up for various events. So I had a Signup model :has_many timeslots that :has_many people. I needed to retrieve the email addresses for people that had signed up for timeslots after a certain time (i.e. all the people that had registered for a timeslot after Saturday at 10:00). Since the timeslots may not be in chronological order, I couldn’t find timeslots by a timeslot id.

Continue reading »

Apr30

Dynamic find_by_* methods in Rails

webdev rails | comments

In looking at my logs, it many people come to this site based on the find_by_name text in the header. If you are such a person, I assume you are new to Rails and are wanting to learn more about it. Here’s a few tips:

Continue reading »

Apr22

mod_rails and the demise of the Ruby/Rails community

webdev ruby rails | comments

mod rails was released recently (I submitted a voice sample to narrate the demo screencast, but they went with the ├╝ber-helpful Ryan Bates), giving hope to not-big-enough-to-require-a-dedicated-server Rails developers everywhere. Deployment has long been the biggest complaint against Rails, and hopefully this gem will facilitate getting Rails apps up and running on servers everywhere.

Continue reading »

Apr04

acts_as_asp.net

webdev ruby rails | comments

I caught this one a little too late, but thought it deserved some pub. After being exposed to the .NET world for the last few months at my new job, I, too, have come to appreciate some of the niceties that the .NET framework provides. Fortunately I’m not the only one who notices this shortcoming, and a Rails plugin has been developed to give it .NET functionality. The short description is definitely worth reading.

Continue reading »