My Profile Photo

rubycoloredglasses


I'm Jason, a web applications developer in the San Francisco Bay area.


  1. Setting up Ubuntu for Rails App via Passenger

    These instructions apply to Ubuntu 11.04 (natty). …


  2. Formtastic use of semantic_form_remote_for

    With the update to Formtastic version 2.0.0.rc1 the ‘semantic_remote_form_for’ method was removed and support was added to ‘remote_form_for’ used like this: …


  3. Exporting Routes in Rails 3

    I’m currently upgrading a project I’m working on from Rails 2.3.8 to Rails 3.1. As part of this upgrade I need to test the entire application for issues, because we haven’t actually written any tests. …


  4. Using URL Helpers in Models or Rake Tasks

    If for some reason you need to use URL helpers which are based on the routes you’ve defined in Rails 3.1, simply add the following to the model method or rake task: …


  5. Building a Query String from a Hash with Rails 3

    I have a model has a method that generates and stores a cached link to it’s own view for use in mailers. Under Rails 2 the method which generated this link created the beginning of the URL based on the owner of the object (this is a multi-domain system I’m working on), however it required that a hash of parameters be included in the link. …


  6. Rails 3 Autoloading with Namespaced Models

    I’m working through an upgrade from Rails 2.3.8 to Rails 3.1, and a set of name spaced models that I setup are giving errors when I run a certain Rake task that relies on them. I looked into the issue and it appears that I need to learn the way Rails 3 loads models. …


  7. Form Fields not Displaying with Formtastic

    The Rails project I’m currently working on uses Formtastic, a Rails form builder plugin. The projects description says “Formtastic is a Rails FormBuilder DSL (with some other goodies) to make it far easier to create beautiful, semantically rich, syntactically awesome, readily stylable and wonderfully accessible HTML forms in your Rails applications.” I wasn’t sure what DSL means, but found in the projects wiki on the About page that it stands for Domain Specific Language. …


  8. Adding Event Listeners to Google-Maps-for-Rails Markers

    I’m currently working on a Ruby on Rails project that was setup under Rails 2, and we’re upgrading it to Rails 3 via a separate branch. …


  9. Issues with Bluetooth in OS X Lion after Upgrade

    I recently upgraded from OS X Lion (10.7.1) from Snow Leopard so that I could be up-to-date and benefit from any good features. Truthfully I liked the old Expose and Spaces better than this new Mission Control interface for virtual desktops…but oh well it will do. …


  10. Redirect_to not working

    I was just working on a Ruby on Rails controller method that receives information from the previous form via HTTP POST. I coded it so that if certain form variables weren’t present it would set a flash message and redirect to the form page. I tried and tried and still the redirect wasn’t working. I reset my web server, and even restarted my computer, but stil this didn’t resolve the issue. …