Sha256: 9cb0620b61caec4800b10f2cc40bacec5a30cd320ca33779ff32fc92e477f861
Contents?: true
Size: 729 Bytes
Versions: 3
Compression:
Stored size: 729 Bytes
Contents
module Lanes module API module HelperMethods def bootstrap_data Oj.dump Extension.bootstrap_data(self) end def user_data if (user_id = session[:user_id]) && (user = Lanes::User.where( id: user_id ).first) Oj.dump(user.workspace_data, mode: :compat) else {} end end def csrf_token Rack::Csrf.csrf_token(env) end def lanes_api_url Lanes.config.mounted_at end def data @json_data ||= Oj.load( request.body.read ) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
lanes-0.0.3 | lib/lanes/api/helper_methods.rb |
lanes-0.0.2 | lib/lanes/api/helper_methods.rb |
lanes-0.0.1 | lib/lanes/api/helper_methods.rb |