Problems with parsing params for Active Record


I have come into an odd problem that I couldn't figure out why.
Basically, what I did is to save a record from the form, but there's
some field that parsed to the active record returns as nil.


article ={"title"=>"halo world","content"=>"lorem ipsum",
#<Article id:nil, title: "halo world",content:"lorem ipsum", tags:nil,

I don't understand why tags and project_id is nil, while I supplied my

My Migration Data

create_table :articles do |t|
      t.string :title
      t.text :tags
      t.text :keyword
      t.text :content
      t.references :project

I am running on ruby 1.8.6 entreprise and rails 2.3.5.

Have someone come across this before. Really need some advise.


Are you using attr_protected anywhere (or are any plugins calling it
on your models) ?


Thanks for reply Frederick.

Is a new project. I didn't use any plugins. More funny thing is I
manually set the attributes without problem.


It works. However, not for parsing by array. I have did a few project
before, this is the first time encounter this funny issue. I try this
on rails console too, it is the same result.

Hi Frederick,

How about :

article = =>"halo world",:content=>"lorem ipsum",

This example can be found at

Did it worked out?

Hi Joao,

Is the same thing. Project ID and Tags leaves as nil for no reason.

Hi Joao,

Is the same thing. Project ID and Tags leaves as nil for no reason.

Are there any warnings in the console ? This really does sound an
awful lot like attr_protected or attr_accessible are being used
without you knowing it.