gregbell/active_admin — Issue #854: Before_create callback is not working..
Author: stonehz
Created: 2011-12-16 23:21:03+00:00
State: open

### Scenario

I'm Using active_admin to create an order.
and trying to do the very simple in my model:
```before_create :set_default_values```

```def set_default_values
self.enabled = true
self.approved = false
end```

In my admin/order.rb I have various sidebars, panels, index , show __BUT not form__
( using the formtastic generated vanilla style)

When I create the new order, the fields are not using the "before_create" values.
and When I try to save it raises:
```undefined method `orders_url' for #```

If I shutdown the server, comment out the before_create callback, it works!!!!

I'm using the following active_admin fork:
:git => 'git://github.com/macfanatic/active_admin.git', :branch => "270_batch_edit_api"