Password reset

Add ability for users to reset their passwords via email. Also allows users to edit their email and passwords within the app. Resolves #13 .
Yes. Thanks for the clarification. 

> On Jul 7, 2014, at 7:34 AM, Zachary Porter <notifications@github.com> wrote:
> 
> In app/controllers/password_resets_controller.rb:
> 
> > +  def edit
> > +    @user = User.find_by_password_reset_token!(params[:id])
> > +  end
> > +
> > +  def update
> > +    @user = User.find_by_password_reset_token!(params[:id])
> > +
> > +    if @user.password_reset_sent_at < 2.hours.ago
> > +      redirect_to reset_path, flash: { danger: 'Password reset has expired.' }
> > +    elsif @user.update_attributes(params.require(:user).permit(:password, :password_confirmation))
> > +      redirect_to root_path, flash: { success: 'Password has been reset!' }
> > +    else
> > +      render :edit
> > +    end
> > +  end
> > +end
> @reagent -- by "isn't backed by a database", do you mean doesn't inherit from ActiveRecord::Base?
> 
> —
> Reply to this email directly or view it on GitHub.