A few words on plugins

1,533 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,533
On SlideShare
0
From Embeds
0
Number of Embeds
26
Actions
Shares
0
Downloads
15
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

A few words on plugins

  1. 1. A rails powered job site a few words on plugins
  2. 2. about me • Koen Van der Auwera • Co-founder 10to1 (http://10to1.be) • Enjoying Java since 2000, Ruby since 2003 • http://atog.be
  3. 3. Plugins • A rails plugin is either an extension or a modification of the core framework • It just works
  4. 4. To name a few • restful authentication (Rick Olson) • ssl Requirement (David Heinemeier Hansson) • Auto complete (David Heinemeier Hansson) • Simple captcha (Sur Max)
  5. 5. Restful authentication • Rick Olson (Rails Core Team member) • Restful Authentication Generator • http://svn.techno-weenie.net/projects/ plugins/restful_authentication/README
  6. 6. usage • ‘script/generate authenticated user sessions [--include activation] [--stateful]’ • ‘user’, the model that gets created in signup • ‘sessions’, the controller that handles the login
  7. 7. usage • login_required filter • signup • login
  8. 8. SSL requirement • David Heinemeier Hansson • SSL usage / integration • http://dev.rubyonrails.org/svn/rails/plugins/ ssl_requirement/README
  9. 9. 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
  10. 10. usage class ApplicationController < ActiveRecord::Base include SslRequirement end class UserController < ApplicationController ssl_required :signup, :payment ssl_allowed :index end
  11. 11. Auto complete • David Heinemeier Hansson • Auto completing text fields • Script.aculo.us • http://dev.rubyonrails.org/browser/plugins/ auto_complete/README
  12. 12. usage # Controller class BlogController < ApplicationController auto_complete_for :post, :title end # View <%= text_field_with_autocompletion :post, :title %>
  13. 13. Simple captcha • Sur Max (http://expressica.com) • A captcha plugin • A single line in views and controllers/ models • http://expressica.com/simple_captcha
  14. 14. usage ApplicationController < ActionController::Base include SimpleCaptcha::ControllerHelpers end # view <%= show_simple_captcha %> # controller def do_something if simple_captcha_valid? else end end
  15. 15. more plugins? • http://dev.rubyonrails.org/browser/plugins/ • plugin list --source=http:// dev.rubyonrails.com/svn/rails/plugins/

×