skyeagle / nested_set

Rails 3 support! An awesome replacement for acts_as_nested_set and better_nested_set.
MIT License
170 stars 24 forks source link

Getting an error whilst using with Rails Admin #48

Open robbied72 opened 12 years ago

robbied72 commented 12 years ago

Hi All,

Seem to be getting this error whilst creating a page in my Rails Admin CMS -

Unauthorized assignment to lft: it's an internal field handled by acts_as_nested_set code, use move_to_* methods instead.

Full Page Code -

 ActiveRecord::ActiveRecordError in RailsAdmin::MainController#new

 Unauthorized assignment to lft: it's an internal field handled by acts_as_nested_set code, use move_to_* methods instead.

 Rails.root: /Users/Robbie/VSWeb/ecoslide
 Application Trace | Framework Trace | Full Trace

 Request

 Parameters:

{"utf8"=>"✓",
 "authenticity_token"=>"eSnjsMt/Ukbf7pltwc6TtJlooxKcimJPHMueTIJzod0=",
 "page"=>{"menu"=>"About",
 "title"=>"About ECOSlide",
 "slug"=>"",
 "content"=>"<pre>\r\nUnauthorized assignment to lft: it&#39;s an internal field handled by acts_as_nested_set code,
 use move_to_* methods instead.</pre>\r\n",
 "metakw"=>"",
 "metadesc"=>"",
 "parent_id"=>"",
 "lft"=>"0",
 "rgt"=>"0",
 "page_order"=>"2",
 "active"=>"1"},
 "return_to"=>"http://ecoslide.dev/ecoadmin/page",
 "_save"=>"",
 "model_name"=>"page"}

Show session dump

Show env dump
Response

Headers:

None

Help would be appreciated

Regards

Robbie

geron-cn commented 12 years ago

i finnaly find this; change

project.update_attributes(project.attributes)

to

project.save

mibamur commented 10 years ago

@robbied72 so you may close it or no?