Sha256: 8dc6aaa86268dd7af661ce9a323e659a52c3791399498bc40084b129a9625365

Contents?: true

Size: 555 Bytes

Versions: 3

Compression:

Stored size: 555 Bytes

Contents

class DeviseExtensions::SessionsController < Devise::SessionsController
  layout :layout_by_resource
  
  # GET /resource/sign_in
  def new
    @home_page_stylesheets = ['home_page/application', 'home_page/sign_in']
    self.resource = resource_class.new(sign_in_params)
    clean_up_passwords(resource)
    respond_with(resource, serialize_options(resource))
  end
  
  protected

  def layout_by_resource
    if devise_controller? && resource_name == :user && action_name == 'new'
      'home_page/sign_in'
    else
      'application'
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
home_page-0.0.6 app/controllers/devise_extensions/sessions_controller.rb
home_page-0.0.5 app/controllers/devise_extensions/sessions_controller.rb
home_page-0.0.4 app/controllers/devise_extensions/sessions_controller.rb