Sha256: 3781f699c7a9bd0e16e978361bd0557aa402db5aae7d2925186dea9c3359dc70

Contents?: true

Size: 277 Bytes

Versions: 10

Compression:

Stored size: 277 Bytes

Contents

module Agilibox::BackUrlConcern
  extend ActiveSupport::Concern

  private

  def default_back_url; end

  def back_url
    [
      params[:back_url],
      request.referer,
      default_back_url,
      main_app.root_path,
      "/",
    ].select(&:present?).first
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
agilibox-1.0.9 app/controllers/concerns/agilibox/back_url_concern.rb
agilibox-1.0.8 app/controllers/concerns/agilibox/back_url_concern.rb
agilibox-1.0.7 app/controllers/concerns/agilibox/back_url_concern.rb
agilibox-1.0.6 app/controllers/concerns/agilibox/back_url_concern.rb
agilibox-1.0.5 app/controllers/concerns/agilibox/back_url_concern.rb
agilibox-1.0.4 app/controllers/concerns/agilibox/back_url_concern.rb
agilibox-1.0.3 app/controllers/concerns/agilibox/back_url_concern.rb
agilibox-1.0.2 app/controllers/concerns/agilibox/back_url_concern.rb
agilibox-1.0.1 app/controllers/concerns/agilibox/back_url_concern.rb
agilibox-1.0.0 app/controllers/concerns/agilibox/back_url_concern.rb