title: Unpermitted parameters: avatar even I have permitted it in my controller
body: <p>I have used carrierwave in my application, but some reason I am getting this error --> <code>Unpermitted parameters: avatar</code> even thought I have permitted params. </p>
  
  <p>I am using <code>nested_form</code> with <code>Single Table Inheritance</code>  </p>
  
  <p>here are the codes --> <code>removed_url</code></p>
  
  <p>and here are the server logs:  </p>
  
  <pre><code>Started POST "/alerts" for 127.0.0.1 at 2014-05-05 15:44:51 -0500
      Processing by AlertsController#create as HTML
        Parameters: {"utf8"=&gt;"✓", "authenticity_token"=&gt;"jRaArdof0tbBHCXmdPqNiNpainmqliIx0sS9HdaBEcw=", "alert"=&gt;{"victims_attributes"=&gt;{"0"=&gt;{"first_name"=&gt;"victim1", "last_name"=&gt;"victim1", "race"=&gt;"race", "gender"=&gt;"gender", "hair_color"=&gt;"black", "eye_color"=&gt;"black", "height_ft"=&gt;"12", "height_inch"=&gt;"12", "age"=&gt;"12", "age_unit"=&gt;"month", "birth_date"=&gt;"05/02/2014", "weight"=&gt;"125", "additional_info"=&gt;"125", "images_attributes"=&gt;{"0"=&gt;{"avatar"=&gt;[#&lt;ActionDispatch::Http::UploadedFile:0x00000007f23350 @tempfile=#&lt;Tempfile:C:/Users/jk12907/AppData/Local/Temp/RackMultipart20140505-56936-1neutn&gt;, @original_filename="IMG_4470.JPG", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"alert[victims_attributes][0][images_attributes][0][avatar][]\"; filename=\"IMG_4470.JPG\"\r\nContent-Type: image/jpeg\r\n"&gt;]}}, "_destroy"=&gt;"false"}}, "created_at"=&gt;"2014/05/07 15:43", "nic"=&gt;"nic", "investigating_officer_name"=&gt;"officername", "investigating_officer_title"=&gt;"officername", "investigating_officer_phone"=&gt;"officername", "agency_name"=&gt;"agencyname", "agency_phone"=&gt;"agencyphone", "reporting_agency_phone"=&gt;"agencyphone", "reporting_agency_email"=&gt;"agencyemail", "last_seen"=&gt;"2014/05/06 15:43", "last_known_address"=&gt;"address", "last_known_city"=&gt;"city", "last_known_state"=&gt;"state", "last_known_county"=&gt;"travis", "last_known_zip"=&gt;"78660", "site_of_incident"=&gt;"site of incident", "suspects_attributes"=&gt;{"0"=&gt;{"first_name"=&gt;"suspect", "last_name"=&gt;"suspect", "race"=&gt;"asian", "gender"=&gt;"male", "hair_color"=&gt;"black", "eye_color"=&gt;"black", "height_ft"=&gt;"12", "height_inch"=&gt;"45", "age"=&gt;"12", "age_unit"=&gt;"months", "birth_date"=&gt;"05/02/2014", "weight"=&gt;"145", "additional_info"=&gt;"add info", "_destroy"=&gt;"false"}}, "vehicles_attributes"=&gt;{"0"=&gt;{"make"=&gt;"ford", "model"=&gt;"ford", "style"=&gt;"make", "year"=&gt;"1995", "color"=&gt;"black", "license_plate_number"=&gt;"TYX", "license_plate_state"=&gt;"TX", "additional_info"=&gt;"add info", "_destroy"=&gt;"false"}}}, "commit"=&gt;"Create Alert"}
        User Load (1.0ms)  SELECT  "users".* FROM "users"  WHERE "users"."id" = 8  ORDER BY "users"."id" ASC LIMIT 1
      Unpermitted parameters: avatar
         (0.0ms)  BEGIN
        SQL (0.0ms)  INSERT INTO "alerts" ("agency_name", "agency_phone", "created_at", "investigating_officer_name", "investigating_officer_phone", "investigating_officer_title", "last_known_address", "last_known_city", "last_known_county", "last_known_state", "last_known_zip", "last_seen", "nic", "reporting_agency_email", "reporting_agency_phone", "site_of_incident", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17) RETURNING "id"  [["agency_name", "agencyname"], ["agency_phone", "agencyphone"], ["created_at", "2014-05-07 15:43:00.000000"], ["investigating_officer_name", "officername"], ["investigating_officer_phone", "officername"], ["investigating_officer_title", "officername"], ["last_known_address", "address"], ["last_known_city", "city"], ["last_known_county", "travis"], ["last_known_state", "state"], ["last_known_zip", "78660"], ["last_seen", "2014-05-06 15:43:00.000000"], ["nic", "nic"], ["reporting_agency_email", "agencyemail"], ["reporting_agency_phone", "agencyphone"], ["site_of_incident", "site of incident"], ["updated_at", "2014-05-05 20:44:51.406138"]]
        SQL (1.0ms)  INSERT INTO "vehicles" ("additional_info", "alert_id", "color", "created_at", "license_plate_number", "license_plate_state", "make", "model", "style", "updated_at", "year") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id"  [["additional_info", "add info"], ["alert_id", 23], ["color", "black"], ["created_at", "2014-05-05 20:44:51.409138"], ["license_plate_number", "TYX"], ["license_plate_state", "TX"], ["make", "ford"], ["model", "ford"], ["style", "make"], ["updated_at", "2014-05-05 20:44:51.409138"], ["year", 1995]]
        SQL (0.0ms)  INSERT INTO "people" ("additional_info", "age", "age_unit", "alert_id", "birth_date", "created_at", "eye_color", "first_name", "gender", "hair_color", "height_ft", "height_inch", "last_name", "race", "type", "updated_at", "weight") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17) RETURNING "id"  [["additional_info", "125"], ["age", 12], ["age_unit", "month"], ["alert_id", 23], ["birth_date", "2014-02-05"], ["created_at", "2014-05-05 20:44:51.411138"], ["eye_color", "black"], ["first_name", "victim1"], ["gender", "gender"], ["hair_color", "black"], ["height_ft", 12], ["height_inch", 12], ["last_name", "victim1"], ["race", "race"], ["type", "Victim"], ["updated_at", "2014-05-05 20:44:51.411138"], ["weight", 125]]
        SQL (0.0ms)  INSERT INTO "images" ("created_at", "person_id", "updated_at") VALUES ($1, $2, $3) RETURNING "id"  [["created_at", "2014-05-05 20:44:51.414138"], ["person_id", 42], ["updated_at", "2014-05-05 20:44:51.414138"]]
        SQL (0.0ms)  INSERT INTO "people" ("additional_info", "age", "age_unit", "alert_id", "birth_date", "created_at", "eye_color", "first_name", "gender", "hair_color", "height_ft", "height_inch", "last_name", "race", "type", "updated_at", "weight") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17) RETURNING "id"  [["additional_info", "add info"], ["age", 12], ["age_unit", "months"], ["alert_id", 23], ["birth_date", "2014-02-05"], ["created_at", "2014-05-05 20:44:51.416138"], ["eye_color", "black"], ["first_name", "suspect"], ["gender", "male"], ["hair_color", "black"], ["height_ft", 12], ["height_inch", 45], ["last_name", "suspect"], ["race", "asian"], ["type", "Suspect"], ["updated_at", "2014-05-05 20:44:51.416138"], ["weight", 145]]
         (19.0ms)  COMMIT
      Redirected to http://127.0.0.1:3000/alerts
      Completed 302 Found in 97ms (ActiveRecord: 21.0ms)
  </code></pre>
  
  <p>I have permitted the params in <code>alerts_controller</code>, <code>people_controller</code> and <code>images_controller</code></p>
  
  <p>and second question I have is, I have mention the dir to upload</p>
  
  <pre><code>def store_dir
      "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
    end
  </code></pre>
  
  <p>am I suppose to see image uploaded to <code>'uploads/'</code> folder of my c drive? I have <code>storage :file</code> on my avatar_uploader.rb file</p>
  
  <p>please let me know what I am doing wrong? First time using Carrierwave here</p>
  
  <p>any helps appreciate</p>