doing the tutorial here: http://net.tutsplus.com/tutorials/intelligent-activerecord-models/ to learn more about making models
Ruby JavaScript CoffeeScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
config
db
doc
lib
log
public
script
test
vendor
.gitignore
Gemfile
Gemfile.lock
README.rdoc
Rakefile
config.ru

README.rdoc

doing the tutorial here: http://net.tutsplus.com/tutorials/intelligent-activerecord-models/ to learn more about making models

Here are a few errors I got and how I solved them:


Error: application.rb:4:in `require': no such file to load -- sha1 (LoadError) fix: changed the require 'sha1' to require 'digest/sha1' in application.rb


Error: Can't mass-assign protected attributes: name, email, password

app/controllers/users_controller.rb:43:in `new'

app/controllers/users_controller.rb:43:in `create'

fix: make sure attr_accessible :email, :name, :password is at the top of user.rb and make sure attr_accessible :completed_at, :completed_by_id, :name, :started_at, :started_by_id is at the top of project.rb


Error: uninitialized constant User::SHA1

app/models/user.rb:9:in `password='

app/controllers/users_controller.rb:43:in `new'

app/controllers/users_controller.rb:43:in `create'

fix: In User.rb changed SHA1::hexdigest(new_password)) to Digest::SHA1.hexdigest(new_password))