Sha256: 92a86d476c62e1b54490ee9af831319cd2facadbd53e1fa014a3df1b88280026

Contents?: true

Size: 403 Bytes

Versions: 41

Compression:

Stored size: 403 Bytes

Contents

# -*- coding: utf-8 -*-
# セッションを扱うコントローラ
class SessionsController < ApplicationController
  before_filter :check_whether_standalone

  def create
    return head :bad_request if params[:username].blank?

    session[:username] = params[:username].to_s

    render text: session[:username]
  end

  def destroy
    session[:username] = nil

    render nothing: true
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
smalruby-editor-0.2.6-x86-mingw32 app/controllers/sessions_controller.rb
smalruby-editor-0.2.6 app/controllers/sessions_controller.rb
smalruby-editor-0.2.5-x86-mingw32 app/controllers/sessions_controller.rb
smalruby-editor-0.2.5 app/controllers/sessions_controller.rb
smalruby-editor-0.2.4-x86-mingw32 app/controllers/sessions_controller.rb
smalruby-editor-0.2.4 app/controllers/sessions_controller.rb
smalruby-editor-0.2.3-x86-mingw32 app/controllers/sessions_controller.rb
smalruby-editor-0.2.3 app/controllers/sessions_controller.rb
smalruby-editor-0.2.2-x86-mingw32 app/controllers/sessions_controller.rb
smalruby-editor-0.2.2 app/controllers/sessions_controller.rb
smalruby-editor-0.2.1-x86-mingw32 app/controllers/sessions_controller.rb
smalruby-editor-0.2.1 app/controllers/sessions_controller.rb
smalruby-editor-0.2.0-x86-mingw32 app/controllers/sessions_controller.rb
smalruby-editor-0.2.0 app/controllers/sessions_controller.rb
smalruby-editor-0.1.24-x86-mingw32 app/controllers/sessions_controller.rb
smalruby-editor-0.1.24 app/controllers/sessions_controller.rb
smalruby-editor-0.1.23-x86-mingw32 app/controllers/sessions_controller.rb
smalruby-editor-0.1.23 app/controllers/sessions_controller.rb
smalruby-editor-0.1.22-x86-mingw32 app/controllers/sessions_controller.rb
smalruby-editor-0.1.22 app/controllers/sessions_controller.rb