Displaying 2 results from an estimated 2 matches for "acampolon".
2011 May 11
2
method_missing in controller
Hi,
I am using a method_missing method into a controller.
I have a route that says:
match '':controller/:action''
What surprise me is that if a view that match the action name exists
method_missing is not invoked but rails happily render the view.
I was expecting that method_missing was going to be invoked if
declarated.
Is that a normal behaviour?
Thanks
Andrea
--
You
2012 Sep 18
2
Access block scope from AR object
I need to create a sort of transaction around some Active Record objects
that perform many insert/updates.
Example:
class MyObject
def transaction &block
@my_var = value
self.instance_eval block
end
end
MyObject.new.transaction do
Model.create
Model.collection.create
etc......
end
I have a gem that add a method into AR::Base and I need to read