search for: has_right_

Displaying 1 result from an estimated 1 matches for "has_right_".

2010 Mar 18
3
method_missing
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 active record methods based on method missing. in the console it seems to work ok so i got some problem in debugging. how can i call from Account#method_missing the activeRecord::Base#method_missing ?...