Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Just add the authentication_token to the attr_accessible Eg: The error that I was getting </p> <blockquote> <p>Media1s-Mac-mini:rails_apps media1$ rake clipsfree_import RAILS_ENV=development csvfile=/Users/media1/Desktop/clips/atemp5/demotracks2/import.csv rake aborted! Can't mass-assign protected attributes: title /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activemodel-3.2.11/lib/active_model/mass_assignment_security/sanitizer.rb:48:in process_removed_attributes' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activemodel-3.2.11/lib/active_model/mass_assignment_security/sanitizer.rb:20:indebug_protected_attribute_removal' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activemodel-3.2.11/lib/active_model/mass_assignment_security/sanitizer.rb:12:in sanitize' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activemodel-3.2.11/lib/active_model/mass_assignment_security.rb:230:insanitize_for_mass_assignment' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.11/lib/active_record/attribute_assignment.rb:75:in assign_attributes' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.11/lib/active_record/base.rb:497:ininitialize' /Users/media1/Desktop/rails_apps/lib/tasks/clipsfree_import.rake:14:in new' /Users/media1/Desktop/rails_apps/lib/tasks/clipsfree_import.rake:14:inblock (2 levels) in ' /Users/media1/Desktop/rails_apps/lib/tasks/clipsfree_import.rake:5:in each' /Users/media1/Desktop/rails_apps/lib/tasks/clipsfree_import.rake:5:inblock in ' Tasks: TOP => clipsfree_import (See full trace by running task with --trace)</p> </blockquote> <p>Solution: Added the attribute title to attr_accessible in the loopsfree.rb in the models folder</p> <pre><code>class Loopsfree &lt; ActiveRecord::Base attr_accessible :ISRC, :title, :artist, :bpm, :file_name, :genre, :id, :sub_genre end </code></pre> <p>Hope this helps :) Happy coding</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload