We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
View the source: https://github.com/RestPack/sample-apps/tree/master/sinatra-sample
require 'sinatra' require 'restpack-web' class App < Sinatra::Base include RestPack::Web::Sinatra::App get '/' do erb :index end end
<div> Welcome to the sample RestPack Sinatra app <hr /> <% if @restpack.user %> <h1>Hi <%= @restpack.user['name'] %></h1> <a href="<%= @restpack.logout_url() %>">Logout</a> <% else %> Login with : <a href="<%= @restpack.login_url(:twitter) %>">Twitter</a> | <a href="<%= @restpack.login_url(:google_oauth2) %>">Google</a> <% end %> <hr /> <%= Maruku.new(@restpack.debug_info).to_html %> </div>