Class | Module |
In: |
lib/picnic.rb
|
Parent: | Object |
Enable authentication for your app.
For example:
Camping.goes :Blog Blog.picnic! $CONF[:authentication] ||= {:username => 'admin', :password => 'picnic'} Blog.authenticate_using :basic module Blog def self.authenticate(credentials) credentials[:username] == Taskr::Conf[:authentication][:username] && credentials[:password] == Taskr::Conf[:authentication][:password] end end
Note that in the above example we use the authentication configuration from your app‘s conf file.
Initialize your application‘s database logger. If enabled, all SQL queries going through ActiveRecord will be logged here.
THIS SEEMS TO BE BROKEN RIGHT NOW and I can‘t really understand why.
Initialize your application‘s logger. This is automatically done for you when you call picnic! The logger is initialized based on your :log configuration. See config.example.yml for info on configuring the logger.
Adds Picnic functionality to a Camping-enabled module.
Example:
Camping.goes :Blog Blog.picnic!
Your Blog Camping app now has Picnic functionality.