Sha256: ef5a0cf5d574989f7e80bcd2851cc40e3520358c0d34cd832ba197070fc14f46

Contents?: true

Size: 370 Bytes

Versions: 13

Compression:

Stored size: 370 Bytes

Contents

# frozen_string_literal: true

class TalkieController < ApplicationController
  include Talkie::Controller

  before_action :authorize!

  protected

  def authorize!
    if !current_permission.allow?(params[:action], current_comment)
      redirect_back fallback_location: main_app.root_url, status: :unauthorized
    end
  end

  def current_comment
    nil
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
talkie-0.5.1 app/controllers/talkie_controller.rb
talkie-0.5.0 app/controllers/talkie_controller.rb
talkie-0.4.1 app/controllers/talkie_controller.rb
talkie-0.4.0 app/controllers/talkie_controller.rb
talkie-0.3.5 app/controllers/talkie_controller.rb
talkie-0.3.4 app/controllers/talkie_controller.rb
talkie-0.3.3 app/controllers/talkie_controller.rb
talkie-0.3.2 app/controllers/talkie_controller.rb
talkie-0.3.1 app/controllers/talkie_controller.rb
talkie-0.3.0 app/controllers/talkie_controller.rb
talkie-0.2.0 app/controllers/talkie_controller.rb
talkie-0.1.1 app/controllers/talkie_controller.rb
talkie-0.1.0 app/controllers/talkie_controller.rb