Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7613981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:17:10+00:00 2026-05-31T02:17:10+00:00

So after a merge, my RoR 3 project no longer does ‘creates’ correctly. Default

  • 0

So after a merge, my RoR 3 project no longer does ‘creates’ correctly. Default attributes get set correctly, but not the ones I pass in:

1.9.3-p125 :020 > f=Ifilter.create(:name => "test2", :regex => "()" )
SQL (101.5ms)  INSERT INTO "ifilters" ("created_at", "name", "regex", "updated_at") VALUES    (?, ?, ?, ?)  [["created_at", Sat, 10 Mar 2012 03:36:24 UTC +00:00], ["name", nil], ["regex", nil], ["updated_at", Sat, 10 Mar 2012 03:36:24 UTC +00:00]]

=> #<Ifilter id: 2, name: nil, regex: nil, created_at: "2012-03-10 03:36:24", updated_at: "2012-03-10 03:36:24"> 

However, save still works:

1.9.3-p125 :021 > f=Ifilter.new
 => #<Ifilter id: nil, name: nil, regex: nil, created_at: nil, updated_at: nil> 
1.9.3-p125 :022 > f.name = "test"
 => "test" 
1.9.3-p125 :023 > f.regex = "()"
 => "()" 
1.9.3-p125 :024 > f.save
  SQL (4.8ms)  INSERT INTO "ifilters" ("created_at", "name", "regex", "updated_at") VALUES (?, ?, ?, ?)  [["created_at", Sat, 10 Mar 2012 04:13:10 UTC +00:00], ["name", "test"], ["regex", "()"], ["updated_at", Sat, 10 Mar 2012 04:13:10 UTC +00:00]]
 => true 

What’s going on?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T02:17:11+00:00Added an answer on May 31, 2026 at 2:17 am

    Looks like you may have attr_accessible on your model. http://api.rubyonrails.org/classes/ActiveModel/MassAssignmentSecurity/ClassMethods.html#method-i-attr_accessible

    If you are using it, attributes that aren’t explicitly listed won’t get set via #new, #create, and #update_attributes (and a few more).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After doing a subversion merge with a co-worker, my VSeWSS project no longer build
I've got two branches that are fully merged together. However, after the merge is
TortoiseHg adds a ms (merge status?) column after doing a merge which indicates 'R'
What do I need to do to get a macro to run after a
I was using stl::merge to put two sorted collections into one. But my object
I have just set up Redmine on my server with a project that has
In a MVC3-application with Ninject.MVC 2.2.0.3 ( after merge ), instead of injecting repostories
I have merged with other branch, and there are few commits after merge, before
First I created two results of a & b by using heapq.merge , but
i want to run a batch file after a merge operation to resolve certain

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.