Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

MassAssignment problem with ActiveRecord 2.3.9

#5835

Hi,
i have a problem with ActiveRecord 2.3.9, the massassignment doesn't
work. New Database entry is nil for all parameters.
If i use ActiveRecord 2.3.5 everything works fine.
Anybody an idea if there is a bug?

#ActiveRecord::Base.establish_connection(...)
#class Tag < ActiveRecord::Base;end
Tag.create(...)
Tag.find(:all)

Thanks,
astrid

Reported by Astrid Kurbin · October 18th, 2010 @ 03:15 PM

State: stale
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Jeff Kreeftmeijer
    Jeff Kreeftmeijer
    • State changed from new to needs-more-info
    • Tag set to 2.3.9, activerecord
    • Importance changed from to Low

    Can you please give us a code sample we can run that demonstrates the problem you're having? I'll put this one on need-more-info for now. :)

    October 18th, 2010 @ 09:01 PM

  2. Astrid Kurbin
    Astrid Kurbin

    The model:
    class Tag < ActiveRecord::Base
    end

    connection:
    ActiveRecord::Base.establish_connection(
    :adapter => 'sqlite3', :database => 'test.sqlite3.db' )

    call:
    Tag.create(:description => "test", :typpe => "some")

    if using ActiveRecord 2.3.9
    Tag.find(:all) gives me the entry with :description => nil and typpe => nil

    If using ActiveRecord 2.3.5
    Tag.find(:all) gives me the entry with :description => "test" and typpe => "some"

    so you only need the Model and the create method to try out the behavior

    I hope this helps

    October 19th, 2010 @ 12:49 PM

  3. Santiago Pastorino
    Santiago Pastorino
    • State changed from needs-more-info to open
    • Tag changed from 2.3.9, activerecord to 239, activerecord

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

    February 2nd, 2011 @ 04:29 PM

  4. Santiago Pastorino
    Santiago Pastorino
    • State changed from open to stale

    February 2nd, 2011 @ 04:29 PM