Building Blocks & Learning Experiences

Browsing Posts tagged Rails

In the process of setting up metric_fu, I found that, one way or another, saikuro’s output wasn’t getting into the correct place. I’ll spare you the long story, and just show the config settings I had to put into my Rakefile to get things working: config.saikuro = { :output_directory => “#{ENV[“CC_BUILD_ARTIFACTS”]}/scratch/saikuro”, :input_directory => [“app\” –input_directory […]

I was having all sorts of problems upgrading Mildred to Rails 2.1.  A lot of the errors I was seeing were like the following: ArgumentError in ‘TracksController downloading a track by admin should not be a redirection’ wrong number of arguments (0 for 1) /Users/ewollesen/src/mildred/app/models/track.rb:52:in `title’ /Users/ewollesen/src/mildred/app/models/track.rb:52:in `filename’ /Users/ewollesen/src/mildred/app/controllers/tracks_controller.rb:49:in `download’ ./spec/controllers/tracks_controller_spec.rb:82: It took me a […]

Rails’s JavaScript generator provides some great functionality. But unfortunately, one of the things it can’t do for you, is generate JavaScript conditionally, based on the page’s content. The reason is simply that the page’s content doesn’t exist at the time the conditional in your code was executed. I wanted to do something like the following: […]