Sha256: d70759df4b106fdc0b92ff097327f1c5c12587791ce68bf68692d8daef17c468

Contents?: true

Size: 609 Bytes

Versions: 1

Compression:

Stored size: 609 Bytes

Contents

class PersonSessionsController < ApplicationController

  def new
    @person_session = PersonSession.new
    @user = User.new(params[:user])
    session[:return_to] = params[:return_to] if params[:return_to].present?
  end

  def create
    @person_session = PersonSession.new(params[:person_session])
    if @person_session.save
      redirect_to_stored_location(:user)
      flash[:notice] = t('log.in.success').capitalize
    else
      flash[:error] = t('log.in.failed').capitalize
      redirect_to_stored_location do
        @user = User.new
        render :action => :new
      end
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
forgeos_commerce_front-1.9.0 app/controllers/person_sessions_controller.rb