Class: Bolt::UserSessionsController
Instance Method Summary
collapse
#blank, #index
#bolt_config_dashboard_url, #bolt_config_email_from_address, #bolt_config_hostname, #bolt_config_javascript_includes, #bolt_config_logo, #bolt_config_stylesheet_includes, #bolt_config_website_name
Methods included from BoltHelper
#bolt_check_box, #bolt_check_box_group, #bolt_collection_select, #bolt_date_select, #bolt_datetime_select, #bolt_file_field, #bolt_generate_page_title, #bolt_get_access_level_array, #bolt_get_access_level_text, #bolt_get_full_version_string, #bolt_get_short_version_string, #bolt_get_version_info, #bolt_hidden_field, #bolt_password_field, #bolt_radio_button, #bolt_radio_button_group, #bolt_select, #bolt_show_icon, #bolt_show_row_icon, #bolt_table_cell_link, #bolt_table_cell_no_link, #bolt_text_area, #bolt_text_area_big, #bolt_text_field, #bolt_time_select, #bolt_time_zone_select
Instance Method Details
#create ⇒ Object
15
16
17
18
19
20
21
22
23
|
# File 'app/controllers/bolt/user_sessions_controller.rb', line 15
def create
@user_session = Bolt::UserSession.new params[:bolt_user_session]
if @user_session.save
flash[:notice] = "Login successful"
redirect_back_or_default :controller => :dashboard, :action => :index
else
render :action => :new
end
end
|
#destroy ⇒ Object
25
26
27
28
29
|
# File 'app/controllers/bolt/user_sessions_controller.rb', line 25
def destroy
current_user_session.destroy
flash[:notice] = "Logout successful"
redirect_back_or_default new_bolt_user_session_url
end
|
#new ⇒ Object
11
12
13
|
# File 'app/controllers/bolt/user_sessions_controller.rb', line 11
def new
@user_session = Bolt::UserSession.new
end
|