about me
• Koen Van der Auwera
• Co-founder 10to1 (http://10to1.be)
• Enjoying Java since 2000, Ruby since 2003
• http://atog.be
Plugins
• A rails plugin is either an extension or a
modification of the core framework
• It just works
To name a few
• restful authentication (Rick Olson)
• ssl Requirement (David Heinemeier
Hansson)
• Auto complete (David Heinemeier
Hansson)
• Simple captcha (Sur Max)
Restful authentication
• Rick Olson (Rails Core Team member)
• Restful Authentication Generator
• http://svn.techno-weenie.net/projects/
plugins/restful_authentication/README
usage
• ‘script/generate authenticated user sessions
[--include activation] [--stateful]’
• ‘user’, the model that gets created in signup
• ‘sessions’, the controller that handles the
login
example
• Caboose sample rails app with SSL
• http://blog.caboo.se/articles/2007/4/21/
sample-rails-app-branch-with-ssl
• Includes a self-signed certificate for
localhost and a sample lighttpd config file
usage
class ApplicationController < ActiveRecord::Base
include SslRequirement
end
class UserController < ApplicationController
ssl_required :signup, :payment
ssl_allowed :index
end
Auto complete
• David Heinemeier Hansson
• Auto completing text fields
• Script.aculo.us
• http://dev.rubyonrails.org/browser/plugins/
auto_complete/README
usage
# Controller
class BlogController < ApplicationController
auto_complete_for :post, :title
end
# View
<%= text_field_with_autocompletion :post, :title %>
Simple captcha
• Sur Max (http://expressica.com)
• A captcha plugin
• A single line in views and controllers/
models
• http://expressica.com/simple_captcha
usage
ApplicationController < ActionController::Base
include SimpleCaptcha::ControllerHelpers
end
# view
<%= show_simple_captcha %>
# controller
def do_something
if simple_captcha_valid?
else
end
end
more plugins?
• http://dev.rubyonrails.org/browser/plugins/
• plugin list --source=http://
dev.rubyonrails.com/svn/rails/plugins/
0 comments
Post a comment