I'm trying to implement some type of users so ones can edit data and other can only read.
user.rb
class User < ActiveRecord::Base
has_secure_password
validates_presence_of :email, :password, :on => :create
end
I'm using has_secure_password(I followes http://railscasts.com/episodes/270-authentication-in-rails-3-1?view=asciicast) for sessions and I found cancan but I found this:
http://rubygems.org/gems/cancan and http://rubygems.org/gems/cancancan
so, what is the difference? which must I use?
is this guide for rails 3.1 and cancan a good start point or should I look for another approach?
I'm newbie with rails, thanks in advance.