Skip to content

Instantly share code, notes, and snippets.


Marek Kasztelnik mkasztelnik

View GitHub Profile
mkasztelnik / global.rb
Created Nov 15, 2012 — forked from colinsurprenant/global.rb
shared global ruby configuration dsl example
View global.rb
module App
module Global
extend self
def self.configure(&block)
def [](key)
mkasztelnik / oauth_controller.rb
Created Nov 8, 2012 — forked from dblock/oauth_controller.rb
An updated OAuth2 controller for a Rails app (implies you have ClientApplication and AccessGrant)
View oauth_controller.rb
class OauthController < ApplicationController
class ApiOAuthError < StandardError
attr_accessor :code, :description, :uri, :state
def initialize(code, description, uri = nil, state = nil)
@code = code
@description = description
@uri = uri