attr_accessor :shortlisted_only
normalize_attribute :shortlisted_only do |value|
ActiveRecord::ConnectionAdapters::Column.value_to_boolean(value)
end
Spec error:
1) ListingSearch attributes #shortlisted_only should normalize shortlisted_only from "1" to "true"
Failure/Error: Unable to find matching line from backtrace
SystemStackError:
stack level too deep
# /Users/PikachuEXE/.rvm/gems/ruby-2.0.0-p451/gems/activemodel-4.0.4.rc1/lib/active_model/attribute_methods.rb:330
2) ListingSearch attributes #shortlisted_only should normalize shortlisted_only from "0" to "false"
Failure/Error: Unable to find matching line from backtrace
SystemStackError:
stack level too deep
# /Users/PikachuEXE/.rvm/gems/ruby-2.0.0-p451/gems/activemodel-4.0.4.rc1/lib/active_model/attribute_methods.rb:330
3) ListingSearch attributes #listings when shortlisted_only is set true
Failure/Error: Unable to find matching line from backtrace
SystemStackError:
stack level too deep
# /Users/PikachuEXE/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-4.0.4.rc1/lib/active_record/attribute_methods.rb:50
4) ListingSearch attributes #listings when shortlisted_only is set true
Failure/Error: Unable to find matching line from backtrace
SystemStackError:
stack level too deep
# /Users/PikachuEXE/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-4.0.4.rc1/lib/active_record/attribute_methods.rb:50
Using the normal way to declare accessor at the moment
def shortlisted_only
ActiveRecord::ConnectionAdapters::Column.value_to_boolean(@shortlisted_only)
end
def shortlisted_only=(value)
@shortlisted_only = (ActiveRecord::ConnectionAdapters::Column.value_to_boolean(value))
end
Rails
4.0.4.rc1
,4.0.3
was fineCode:
Spec error:
Using the normal way to declare accessor at the moment