lib/has_eav.rb
def method_missing method_symbol, *args, &block
          method_name    = method_symbol.to_s
          attribute_name = method_name.gsub(/[\?=]$/, '')

          if eav_attributes_list.include? attribute_name
            self.class.generate_methods_for_eav_attribute(attribute_name)

            send(method_symbol, *args)
          else
            super
          end
        end
# override method missing, but only kick in when super fails with a
# NoMethodError
#
override method missing, but only kick in when super fails with a
NoMethodError
override method missing but only kick in when super fails with a NoMethodError
def method_missing method_symbol, *args, &block
          method_name    = method_symbol.to_s
          attribute_name = method_name.gsub(/[\?=]$/, '')
          if eav_attributes_list.include? attribute_name
            self.class.generate_methods_for_eav_attribute(attribute_name)
            send(method_symbol, *args)
          else
            super
          end
        end
def method_missing method_symbol , * args , & block method_name = method_symbol . to_s attribute_name = method_name . gsub ( / [ \? =]$ / , '' ) if eav_attributes_list . include? attribute_name self . class . generate_methods_for_eav_attribute ( attribute_name ) send ( method_symbol , * args ) else super end end
override method missing, but only kick in when super fails with a
NoMethodError
override method missing but only kick in when super fails with a NoMethodError
method_symbol
args
block