Displaying 3 results from an estimated 3 matches for "act_as_".
Did you mean:
acts_as_
2012 Aug 03
1
Mock_model not recognizing act_as_mappable
...Location.al(:bounds=>bounds)l
@locations.sort_by_distance_from([bounds.center.lat,bounds.center.lng])
Rspec:
@location = mock_model(Location)
Location.stub(:all).and_return([@location])
@location.stub!(:sort_by_distance_from).and_return([@location])
Within real model: Location
act_as_mappable
....
the :sort_by_distance_from is a method from within act_as_mappable.
Upon investigation, when I compare the available methods for both the
Location model and the mock_model, I found act_as_mappable is missing from
the mock_model.
Which accounts for why it was failing in the
stu...
2006 Jul 06
3
How To write an acts_as* plugin
Hi,
I need to understand how to write an acts_as_XXX (similar to acts_as_tree)
plugin
Any good resource to get me started?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060706/a974ff06/attachment.html
2007 Apr 20
2
Caching of database values
If do something like this:
dbObj = MyTable.find_by_id(5)
a = dbObj.name
b = dbObj.name
How many times will an SQL call be made to get the value of
MyTable.name for id 5? In other words, are the values for dbObj
cached in the object? Is there a way of controlling that? (I can
imagine that sometimes you might not want to cache them if you wanted
to be sure of having the latest