### Home Classes Methods

### In Files

- app/controllers/application_controller.rb

### Parent

ActionController::Base

### Methods

- #authorize
- #current_cart
- #default_url_options
- #set_i18n_locale_from_params

### 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.

# ApplicationController

### Protected Instance Methods

authorize() click to toggle source

        # File app/controllers/application_controller.rb, line 17
    17:     def authorize

    18:       unless User.find_by_id(session[:user_id])

    19:         redirect_to login_url, :notice => "Přihlašte se prosím"

    20:       end

    21:     end

default_url_options() click to toggle source

        # File app/controllers/application_controller.rb, line 35
    35:     def default_url_options

    36:       { :locale => I18n.locale }

    37:     end

set_i18n_locale_from_params() click to toggle source

        # File app/controllers/application_controller.rb, line 23
    23:     def set_i18n_locale_from_params

    24:       if params[:locale]

    25:         if I18n.available_locales.include?(params[:locale].to_sym)

    26:           I18n.locale = params[:locale]

    27:         else

    28:           flash.now[:notice] =

    29:             "#{params[:locale]} překlad není k dispozici"

    30:           logger.error flash.now[:notice]

    31:         end

    32:       end

    33:     end

### Private Instance Methods

current_cart() click to toggle source

        # File app/controllers/application_controller.rb, line 7
     7:     def current_cart

     8:       Cart.find(session[:cart_id])

     9:     rescue ActiveRecord::RecordNotFound

    10:       cart = Cart.create

    11:       session[:cart_id] = cart.id

    12:       cart

    13:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.