### Home Classes Methods

### In Files

- app/controllers/sessions_controller.rb

### Parent

ApplicationController

### Methods

- #create
- #destroy
- #new

### Files

- README_FOR_APP

### Class Index

Quicksearch

- AdminController
- AdminHelper
- ApplicationController
- ApplicationHelper
- Cart
- CartsController
- CartsHelper
- LineItem
- LineItemsController
- LineItemsHelper
- Notifier
- Order
- OrdersController
- OrdersHelper
- Product
- ProductsController
- ProductsHelper
- SessionsController
- SessionsHelper
- StoreController
- StoreHelper
- User
- UsersController
- UsersHelper

No matching classes.

# SessionsController

### Public Instance Methods

create() click to toggle source

        # File app/controllers/sessions_controller.rb, line 7
     7:   def create

     8:     if user = User.authenticate(params[:name], params[:password])

     9:       session[:user_id] = user.id

    10:       redirect_to admin_url

    11:     else

    12:       redirect_to login_url, :alert => "Neplatné jméno anebo heslo"

    13:     end

    14:   end

destroy() click to toggle source

        # File app/controllers/sessions_controller.rb, line 16
    16:   def destroy

    17:     session[:user_id] = nil

    18:     redirect_to store_url, :notice => "Odhlášený"

    19:   end

new() click to toggle source

       # File app/controllers/sessions_controller.rb, line 4
    4:   def new

    5:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.