lib/restful_resource/base.rb in restful_resource-0.0.7 vs lib/restful_resource/base.rb in restful_resource-0.0.8

- old
+ new

@@ -53,11 +53,19 @@ def initialize(attributes = {}, hack_for_activeresource = false) @inner_object = OpenStruct.new(attributes) end - def method_missing(method, *args, &block) - @inner_object.send(method, *args, &block) + def method_missing(method) + if @inner_object.respond_to?(method) + @inner_object.send(method) + else + super(method) + end + end + + def respond_to?(method, include_private = false) + super || @inner_object.respond_to?(method, include_private) end def valid? errors.nil? || errors.count == g end