Turned out to be an issue with precision on a foreign key number column in Oracle. After debugging inside active record I found the problem.
On Jan 6, 11:39 am, David Holmes <[email protected]> wrote: > AS worked with current versions of Rails and AS from this time last > year. Upgraded both and AS will not work with associations. If I > remove associations from models I can scaffold the one table by > itself. > > I have created a new Rails project to test with the same results. Here > are the models: > class Giveaway < ActiveRecord::Base > has_many :items > end > > class Item < ActiveRecord::Base > belongs_to :giveaway > end > > Error I am getting starting with the AS line: > > NoMethodError (You have a nil object when you didn't expect it! > You might have expected an instance of Array. > The error occurred while evaluating nil.each): > /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > association_preload.rb:125:in `add_preloaded_records_to_collection' > /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > association_preload.rb:141:in `set_association_collection_records' > /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > association_preload.rb:139:in `each' > /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > association_preload.rb:139:in `set_association_collection_records' > /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > association_preload.rb:238:in `preload_has_many_association' > /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > association_preload.rb:120:in `send' > /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > association_preload.rb:120:in `preload_one_association' > /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > association_preload.rb:114:in `each' > /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > association_preload.rb:114:in `preload_one_association' > /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > association_preload.rb:91:in `preload_associations' > /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > association_preload.rb:90:in `preload_associations' > /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > association_preload.rb:90:in `each' > /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > association_preload.rb:90:in `preload_associations' > /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > base.rb:1492:in `find_every' > /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > base.rb:589:in `find' > /vendor/plugins/activescaffold/lib/active_scaffold/finder.rb: > 165:in `find_page' > /vendor/plugins/activescaffold/lib/paginator.rb:66:in `call' > /vendor/plugins/activescaffold/lib/paginator.rb:66:in `page' > /vendor/plugins/activescaffold/lib/paginator.rb:93:in `call' > /vendor/plugins/activescaffold/lib/paginator.rb:93:in `items' > /vendor/plugins/activescaffold/lib/active_scaffold/actions/list.rb: > 64:in `do_list' > /vendor/plugins/activescaffold/lib/active_scaffold/actions/list.rb: > 33:in `list' > /vendor/plugins/activescaffold/lib/active_scaffold/actions/list.rb: > 8:in `index' > ... > > Any ideas please? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/activescaffold?hl=en -~----------~----~----~----~------~----~------~--~---
