Class: Edgar::SssnsController
- Inherits:
-
EdgarController
- Object
- ApplicationController
- EdgarController
- Edgar::SssnsController
- Defined in:
- app/controllers/edgar/sssns_controller.rb
Constant Summary
Constant Summary
Constants inherited from EdgarController
Instance Method Summary (collapse)
- - (Object) create
- - (Object) destroy
-
- (Object) model_class
private
TODO: EdgarController#model_class would solve this namespace issue.
- - (Object) new
Methods inherited from EdgarController
#clear, #csv_download, #draw_flash, #enum_cache_stat, #file_download, #index, #map, #model_name, #on_upsert, #search, #search_clear, #search_load, #search_save, #show, #top, #update, #upsert, #upsert_files, #view_status, #zip_complete
Methods included from RescueMixin
included, #rescue_404, #rescue_edgar_error
Methods included from PermissionMixin
#current_model_permissions, #current_user_roles, included, #require_create_permission, #require_delete_permission, #require_other_permission, #require_read_permission, #require_update_permission, #require_x_permission, #respond_to_permission_error
Methods included from ControllerCommon
#prepare_list, #scope_context, #user_scoped, #view_status_save
Instance Method Details
- (Object) create
11 12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/edgar/sssns_controller.rb', line 11 def create @model = Edgar::User.authenticate(params[:code], params[:password]) if @model session[:user_id] = @model.id redirect_to top_url, notice: v('login_success') else flash.alert = v('login_failed') redirect_to login_path end end |
- (Object) destroy
22 23 24 25 |
# File 'app/controllers/edgar/sssns_controller.rb', line 22 def destroy reset_session redirect_to login_path, notice: v('logout') end |
- (Object) model_class (private)
TODO: EdgarController#model_class would solve this namespace issue.
29 30 31 |
# File 'app/controllers/edgar/sssns_controller.rb', line 29 def model_class Edgar::Sssn end |
- (Object) new
7 8 9 |
# File 'app/controllers/edgar/sssns_controller.rb', line 7 def new render action: 'new', layout: 'login' end |