Sha256: 2ef80bf70b6f72ff2abf51a8f6bf41636d0eb84904fbecb9fd388ddd192f0b62

Contents?: true

Size: 388 Bytes

Versions: 9

Compression:

Stored size: 388 Bytes

Contents

# TODO move to DeviseSessions controller and figure out how to set
# headers after a redirect. Or even, if this is the right approach
module UsersControllerExtensions
  extend ActiveSupport::Concern

  included do
    before_filter :add_new_csrf_token, only: :show

    private
    def add_new_csrf_token
      response.headers['X-CSRF-Token'] = form_authenticity_token
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ende-0.1.13 lib/ende/users_controller_extensions.rb
ende-0.1.12 lib/ende/users_controller_extensions.rb
ende-0.1.11 lib/ende/users_controller_extensions.rb
ende-0.1.10 lib/ende/users_controller_extensions.rb
ende-0.1.9 lib/ende/users_controller_extensions.rb
ende-0.1.8 lib/ende/users_controller_extensions.rb
ende-0.1.7 lib/ende/users_controller_extensions.rb
ende-0.1.6 lib/ende/users_controller_extensions.rb
ende-0.1.5 lib/ende/users_controller_extensions.rb