templates/admin/users.rb in bear-0.0.2 vs templates/admin/users.rb in bear-0.0.3

- old
+ new

@@ -21,10 +21,11 @@ end inject_into_file 'app/controllers/admin/users_controller.rb', :after => "def create\n" do <<-'FILE' @user = User.new + # attr_accessor logic here @user.attributes = params[:user] if @user.save flash[:notice] = "User created!" redirect_to(admin_users_path) else @@ -35,9 +36,10 @@ inject_into_file 'app/controllers/admin/users_controller.rb', :after => "def update\n" do <<-'FILE' params[:user].delete(:password) if params[:user][:password].blank? params[:user].delete(:password_confirmation) if params[:user][:password].blank? and params[:user][:password_confirmation].blank? + # attr_accessor logic here if @user.update_attributes(params[:user]) flash[:notice] = "Successfully updated #{@user.name}." redirect_to(admin_users_url) else render(:action => "edit")