Skip to content

Instantly share code, notes, and snippets.

@PatrickLef
Created March 29, 2011 17:56
Show Gist options
  • Save PatrickLef/892867 to your computer and use it in GitHub Desktop.
Save PatrickLef/892867 to your computer and use it in GitHub Desktop.
padrino generate project fisk
## app/models/blogger.rb
class Blogger < User
include BloggerUtils
end
## app/models/user.rb
class User
end
## app/models/mixins/blogger.rb
module BloggerUtils
end
## app/controllers/index.rb
Fisk.controller do
# Provides sets soo the controller ONLY accepts application/json and application/marshal
# accept headers. It should be able to be overriden by setting .json/.marshal on the
# end of the URI. But it doesn't always work in Padrino 0.9.4
get '/' do
"hi"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment