dcrec1 / acts_as_solr_reloaded

ActsAsSolr with new features
http://www.diegocarrion.com
MIT License
102 stars 30 forks source link

Doesn't work as screencast #2

Closed emerleite closed 11 years ago

emerleite commented 14 years ago

Hi,

I've made as the screencast shows but I only receive this error:

Book.create! :title => "The Rails way", :body => "One of the best books of Rails", :dynamic_attributes => [DynamicAttribute.new(:name => "author", :value => "obie")], :tag_list => "rails,ruby"

NoMethodError: undefined method first' for true:TrueClass from /Users/emerleite/lixo/blank/vendor/plugins/acts_as_solr_reloaded/lib/acts_as_solr/instance_methods.rb:113:inadd_space' from /Users/emerleite/lixo/blank/vendor/plugins/acts_as_solr_reloaded/lib/acts_as_solr/instance_methods.rb:92:in to_solr_doc' from /Users/emerleite/lixo/blank/vendor/plugins/acts_as_solr_reloaded/lib/acts_as_solr/instance_methods.rb:16:insolr_save' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:178:in send' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:178:inevaluate_method' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:166:in call' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:93:inrun' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:92:in each' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:92:insend' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:92:in run' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:276:inrun_callbacks' from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/callbacks.rb:344:in callback' from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/callbacks.rb:251:increate_or_update' from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb:2555:in save_without_validation!' from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/validations.rb:1088:insave_without_dirty!' from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/dirty.rb:87:in save_without_transactions!' from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/transactions.rb:200:insave!' from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in transaction' from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/transactions.rb:182:intransaction' from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/transactions.rb:200:in save!' from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/transactions.rb:208:inrollback_active_record_state!' from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/transactions.rb:200:in save!' from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/validations.rb:1059:increate!'

Thanks,

Emerson

dcrec1 commented 14 years ago

Sorry Emerson, I accepted some pull requests that didn't have a test and they broke the build and caused this bug, my fault.

I reverted the commits and everything should be ok, the tests are passing again.