Hello,

I'm trying to develop a ActiveRecord plugin but run into the following
problem: I pass arguments to

 write_inheritable_attribute :some_field, 'value'
 class_inheritable_reader    :some_field

in ClassMethods module and I'm available to get them in InstanceMethods
with self.class.some_field. But when I try to do like this:

define_method "#{self.class.some_field}"
...

or

class_eval <<-eval
  def #{self.class.some_field}
   ...
  end
eval

I get NoMethodError: undefined method `some_field' for Module:Class

Anybody could help with this?
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to