resolve/refinerycms — Issue #1312: Form Generator Problems
Author: nodabs
Created: 2012-02-22 14:55:24+00:00
State: open

When attempting to use the form generator i ran the following command:

rails g refinery:form testimonial name:string date:date install_type:string contact:string message:text allow_use:checkbox

I followed that up with:

bundle
rails g refinery:testimonials
rake db:migrate

I noted that there was not an entry in the application's seeds.rb file, so i added:

```ruby
Refinery::Testimonials::Engine.load_seed
```

Running the command

rake db:seed

produces the following error:
rake aborted!
Can't mass-assign protected attributes: parent

Tasks: TOP => db:seed

I made some modifications to the seeds.rb file in the testimonals, changing the following:

```ruby
::Refinery::User ==> ::User
::Refinery::Page ==> ::Page
::Refinery::Pages ==> ::Pages
```

This actually allowed the rake command to complete, but i don't think it was totally successful, because the thank_you page was still not created in the database.

I can run the application front end, but when i click the Testimonials
link I am greeted with:

uninitialized constant Refinery::Testimonials::TestimonialsController

Attempting to hit the back end i get:

uninitialized constant Refinery::Admin::TestimonialsController

I'm not sure if this is a pluralization error causing the uninitialized constant, but i think the seeds file may need parent_id as suggested by @parndt (don't think the two issues are related though)