search for: qgbiljoi0dqkmlvzuzlabw

Displaying 4 results from an estimated 4 matches for "qgbiljoi0dqkmlvzuzlabw".

2008 Oct 08
9
Plugins and the test environment
Hi guys. I''m writing a plugin for use in the test environment. However, when I run ``rake test'''' or ``rake spec'''', RAILS_ENV is set to "development" when my plugin''s init.rb is run. How do you configure a plugin to load require a file in the test environment? Thanks, Nick --~--~---------~--~----~------------~-------~--~----~ You
2008 Nov 01
0
Overloading #initialize in a model
I''m using WhinyProtectedAttributes: http://henrik.nyh.se/2007/10/whiny-protected-attributes Say I have this model: class Person < ActiveRecord::Base attribute_accessible :name end If I then create a Person with an invalid attribute, an exception is raised. For example: Person.new :name => ''Bob'', :asdf => ''asdf'' What I''d like to
2008 Nov 24
2
Namespacing conventions
I compared the output from ``rake routes'''' for each solution below, and they both produce the exact same routes. Is one solution preferred over the over? # Solution #1: map.resource :account do |account| account.resources :properties, :controller => ''account/properties'' account.resources :photos, :controller =>
2008 Sep 04
3
Moving HTML out of a model
G''day folks. My RentalMap model uses ym4r_gm to generate a Google map and plot markers on the map. However, a marker''s body contains HTML. It feels dirty to put HTML in the model, but the markers should be plotted by the model. Any suggestions for how I can move the marker HTML template out of the RentalMap model? Cheers, Nick