Sha256: 34e3b0454cb52b8f00348feaf67f1979a017dd036a4d47d975679f8aa67a58f5

Contents?: true

Size: 396 Bytes

Versions: 25

Compression:

Stored size: 396 Bytes

Contents

module SiteClientHelper
  # Extract {Site::Client} id form Devise's redirect_to 
  def redirect_to_site_client_id
    uri = URI.parse session["user_return_to"]

    Rack::Utils.parse_query(uri.query)["client_id"]
  rescue
  end

  def redirect_to_site_client?
    redirect_to_site_client_id.present?
  end

  def redirecting_site_client
    Site::Client.find redirect_to_site_client_id
  end
end

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
social_stream-2.2.2 oauth2_server/app/helpers/site_client_helper.rb
social_stream-oauth2_server-2.2.2 app/helpers/site_client_helper.rb
social_stream-2.2.1 oauth2_server/app/helpers/site_client_helper.rb
social_stream-oauth2_server-2.2.1 app/helpers/site_client_helper.rb
social_stream-2.2.0 oauth2_server/app/helpers/site_client_helper.rb
social_stream-oauth2_server-2.2.0 app/helpers/site_client_helper.rb
social_stream-2.1.1 oauth2_server/app/helpers/site_client_helper.rb
social_stream-oauth2_server-2.1.1 app/helpers/site_client_helper.rb
social_stream-2.1.0 oauth2_server/app/helpers/site_client_helper.rb
social_stream-oauth2_server-2.1.0 app/helpers/site_client_helper.rb
social_stream-2.0.4 oauth2_server/app/helpers/site_client_helper.rb
social_stream-oauth2_server-2.0.3 app/helpers/site_client_helper.rb
social_stream-2.0.3 oauth2_server/app/helpers/site_client_helper.rb
social_stream-oauth2_server-2.0.2 app/helpers/site_client_helper.rb
social_stream-2.0.2 oauth2_server/app/helpers/site_client_helper.rb
social_stream-oauth2_server-2.0.1 app/helpers/site_client_helper.rb
social_stream-2.0.1 oauth2_server/app/helpers/site_client_helper.rb
social_stream-2.0.0 oauth2_server/app/helpers/site_client_helper.rb
social_stream-oauth2_server-2.0.0 app/helpers/site_client_helper.rb
social_stream-2.0.0.beta3 oauth2_server/app/helpers/site_client_helper.rb