Skip to content

Instantly share code, notes, and snippets.

@jodosha
Last active August 29, 2015 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jodosha/10451435 to your computer and use it in GitHub Desktop.
Save jodosha/10451435 to your computer and use it in GitHub Desktop.
Use sessions in Lotus::Action. In response of https://gist.github.com/sidonath/10450111
require 'lotus/controller'
module Blog
module Action
def self.included(base)
base.class_eval do
include Lotus::Action
include Lotus::Action::Session
end
end
end
end
class Show
include Blog::Action
def call(params)
# ...
end
end
use Rack::Session::Cookie, secret: SecureRandom.hex(64)
run Show.new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment