[Rails] method_missing not working in RoR 3.1.1 & Ruby 1.9.2p290?

2011-12-25 Thread Ralph Shnelvar
I am porting a Rails 2.3.8 app (ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-mingw32]) to Rails 3.1.1 Ruby 1.9.2p290 In the 2.4.8 app a method_missing is being called correctly. It's a ghost method. In Rails 3.1.1 Ruby 1.9.2p290 the method_missing is not being called. If I explicitly code a met

[Rails] method_missing in controller

2011-05-11 Thread andreacfm
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 b

[Rails] method_missing woes

2011-02-09 Thread Tyler Pickett
Hey all, I'm working on a gem that provides archiving functionality to AR models and am trying to allow use of the original's methods on the archived copies through method missing but I'm getting some really weird errors and can't for the life of me figure out what's going on. my test class struct

[Rails] `method_missing': undefined method `i18n' for #

2010-07-10 Thread Kristian Mandrup
I have recently upgraqded to Ruby 1.9.2-rc1 and reinstalled rails 3 beta 4 with all the dependencies. I have run bundle install in my rails project. Now I am trying to run some tests... My test_helper.rb file looks like this: # test_helper.rb require 'rubygems' require 'test/unit' require 'rails/

Re: [Rails] method_missing

2010-03-18 Thread Michael Pavling
On 18 March 2010 10:23, eugenio wrote: > i'm using method_missing to implement a simple metaprogramming that > checks for account rights. > > it seems to override some of the active record methods based on method > missing. in the console it seems to work ok so i got some problem in > debugging.

[Rails] method_missing

2010-03-18 Thread eugenio
i'm using method_missing to implement a simple metaprogramming that checks for account rights. in Account << ActiveRecord::Base i defined: def method_missing(m, a = {}) if m.to_s =~ /^has_right_(.*)$/ ... calls another method passing $1 parameter end end it seems to override some of the ac

[Rails] method_missing only in production using custom validation

2009-01-14 Thread Richard Schneeman
I've written a custom validation ah la advanced rails recipes. When i'm in development everything works great. As soon as I "script/server -e production" then my console gets lit up with errors http://www.pastie.org/361177 I played around with what actions cause this, and apparently putting vali

[Rails] method_missing change in activerecord 2.2?

2008-11-26 Thread nofxx
Ouch man, after going all my app to 2.2 , only fun.. The last darn thing I forgot to test, an old legacy table I need to connect sometimes... broke... To resume it, which change in ar could have broken this? http://snippets.dzone.com/posts/show/2034 I can`t get my methods to fallback to the up