Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save Heavyblade/5936648 to your computer and use it in GitHub Desktop.

Select an option

Save Heavyblade/5936648 to your computer and use it in GitHub Desktop.
class PlataformaRegistrationsController < DeviseController
prepend_before_filter :require_no_authentication, :only => [ :new, :create, :cancel ]
prepend_before_filter :authenticate_scope!, :only => [:edit, :update, :destroy]
# GET /resource/sign_up
def new
resource = build_resource({})
app_id = session[:user_return_to].match(/client_id=(\w+)/)[1]
application = Doorkeeper::Application.where(:uid => app_id).first
respond_with resource, :layout => application.name
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment