search for: foomodel

Displaying 2 results from an estimated 2 matches for "foomodel".

2006 Apr 18
7
Connecting to multiple databases
Hi Everyone, I am trying to connect to multiple databases and followed along the Recipe in Chad Fowlers ''Rails Recipes'' book (which basically is about establishing the connection in a subclass of ActiveRecord::Base, and inheriting all classes in need of this connection from this class) Chad Fowler says: "You won''t be able to instantiate an External, of course,
2009 Jul 07
2
paperclip unit testing
...I unit test my model that has a paperclip attachment? I add to my model: --- CODE START --- has_attached_file :image, :default_url => '''' attr_protected :image_file_name, :image_content_type, :image_image_size --- CODE END --- Than I type a UNIT test: --- CODE START --- foo=FooModel.new({:image => File.new(''test/fixtures/img/an_image.gif'')}) --- CODE END --- This works fine until... in that model I have a validator that accesses the "image" attribute: --- CODE START --- image.path --- CODE END --- But there is no image under that path, since i...