Sha256: 2240a239f9a530ecf626015ec8b2461b1e995692077636d994e3f4376b1769fc

Contents?: true

Size: 608 Bytes

Versions: 1

Compression:

Stored size: 608 Bytes

Contents

require_dependency "user_mgmt/application_controller"

module UserMgmt
  class RegistrationsController < ApplicationController
    include ApplicationHelper
  	# GET /user/sign_up
    def new

    end

    # POST /user
    def create

      response = sign_up *params[:user].values
      
      if response[:status] == "200"
        flash[:success] = "User was created succesfully!"
        redirect_to user_log_in_path, { method: 'POST'}
      else 
        flash[:warning] = response[:body]
        redirect_to sign_up_path      
      end

    end

    # GET /user/edit
    def edit

    end

  end  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
user_mgmt-0.3.3 app/controllers/user_mgmt/registrations_controller.rb