diff --git a/lib/straight/order.rb b/lib/straight/order.rb index 36d46b9..fa249c4 100644 --- a/lib/straight/order.rb +++ b/lib/straight/order.rb @@ -37,8 +37,8 @@ def self.included(base) tid title }.each do |field| - attr_reader field unless base.method_defined?(field) - attr_writer field unless base.method_defined?("#{field}=") + attr_reader field unless base.method_defined?(field) || (base.respond_to?(:attribute_method?) && base.attribute_method?(field)) + attr_writer field unless base.method_defined?("#{field}=") || (base.respond_to?(:attribute_method?) && base.attribute_method?("#{field}=")) end prepend Prependable include Includable