RoR Active Record undefined method
问题 That is the error im getting: undefined method `attr_accessible' for # after following a tutorial, my code is: User.rb: class User < ActiveRecord::Base attr_accessible :email, :password, :password_confirmation attr_accessor :password before_save :encrypt_password validates_confirmation_of :password validates_presence_of :password, :on => :create validates_presence_of :email validates_uniqueness_of :email users_conroller.rb: class UsersController < ApplicationController def new @user = User