[rspec-users] what's the meaning of to_param?
zach.dennis at gmail.com
Thu Mar 19 09:15:53 EDT 2009
On Thu, Mar 19, 2009 at 8:46 AM, Zhenning Guan <lists at ruby-forum.com> wrote:
> usually, I just use this way.
> @weather = mock_model(Weather)
> but recently I saw this. so what's the :to_param and :save options
> @weather = mock_model(Weather, :to_param => "1", :save => true)
It's a Rails thing, used when converting an object to a URL representation.
> Posted via http://www.ruby-forum.com/.
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users