Sha256: 82029b8089ab8d3c17d087266dd35a6392744288ccb9488d03658b2bbca5dddc

Contents?: true

Size: 1.27 KB

Versions: 19

Compression:

Stored size: 1.27 KB

Contents

class Muck::AccessCodeRequestsController < ApplicationController

  layout 'popup'

  ssl_required :new, :create
  before_filter :not_logged_in_required, :except => [:create]

  def show
    render :template => 'access_code_requests/show'
  end
  
  def new
    @page_title = t('muck.users.request_access_code')
    render :template => 'access_code_requests/new'
  end
    
  def create
    if logged_in?
      @indicate_logged_in = true
      respond_to do |format|
        format.js do
          render :template => 'access_code_requests/create.js', :layout => false
        end
        format.html do
          flash[:notice] = translate('muck.users.beta_code_not_required')
          redirect_to user_path(current_user)
        end
      end
    else
      @access_code_request = AccessCodeRequest.create(params[:access_code_request])
      respond_to do |format|
        format.js do
          render :template => 'access_code_requests/create.js', :layout => false
        end
        format.html do
          @page_title = t('muck.users.request_access_code')
          if @access_code_request
            redirect_to access_code_request_path(@access_code_request)
          else
            render :template => "access_code_requests/new"
          end
        end
      end
    end
  end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
muck-users-3.2.8 app/controllers/muck/access_code_requests_controller.rb
muck-users-3.2.7 app/controllers/muck/access_code_requests_controller.rb
muck-users-3.2.6 app/controllers/muck/access_code_requests_controller.rb
muck-users-3.2.5 app/controllers/muck/access_code_requests_controller.rb
muck-users-3.2.4 app/controllers/muck/access_code_requests_controller.rb
muck-users-3.2.3 app/controllers/muck/access_code_requests_controller.rb
muck-users-3.2.2 app/controllers/muck/access_code_requests_controller.rb
muck-users-3.2.1 app/controllers/muck/access_code_requests_controller.rb
muck-users-3.2.0 app/controllers/muck/access_code_requests_controller.rb
muck-users-3.1.27 app/controllers/muck/access_code_requests_controller.rb
muck-users-3.1.26 app/controllers/muck/access_code_requests_controller.rb
muck-users-3.1.25 app/controllers/muck/access_code_requests_controller.rb
muck-users-3.1.24 app/controllers/muck/access_code_requests_controller.rb
muck-users-3.1.23 app/controllers/muck/access_code_requests_controller.rb
muck-users-3.1.22 app/controllers/muck/access_code_requests_controller.rb
muck-users-3.1.21 app/controllers/muck/access_code_requests_controller.rb
muck-users-3.1.19 app/controllers/muck/access_code_requests_controller.rb
muck-users-3.1.18 app/controllers/muck/access_code_requests_controller.rb
muck-users-3.1.17 app/controllers/muck/access_code_requests_controller.rb