Posts Tagged ‘merb-auth’

|

My favorite merb guides, tutorials, and resources

Authenticated Hello World

Basic user Signup with MerbAuth

Datamapper documentation - Unlike Rails you can choose your ORM and unlike Rails the ORM docs are stored outside of the core Merb documentation. This is the link to the documentation of the ORM of my choice.

Difference between render and display in merb

Rails-style flash messages with merb. Merb does it cleaner than Rails by not creating a throwaway session.

Merb controller testing

MerbCamp video
Merbcamp recap(s)

MerbAuth Basics - before :ensure_authenticated, :exclude => :index

Nested Resources/Routes information

Deploying Merb apps

Deloying Merb apps on passenger

merb-auth beginner’s tutorial

THIS TUTORIAL IS CURRENTLY OUT OF DATE. Hassox has redone merb-auth and it is even better now. I’ll be updating this tutorial as soon as possible. 

===========

===========

===========

===========

 

(this assumes you’ve already setup merb using this tutorial or something similar)

Install the necessary gems

sudo gem install merb_has_flash
cd ~/sources
git clone git://github.com/hassox/merb-auth.git
cd merb-auth
sudo rake install

Setup init.rb and router.rb

#init.rb
 
dependencies "merb-more", "merb_helpers", "merb-assets", "dm-timestamps", "dm-validations", "merb-slices", "merb-auth", "merb_has_flash"
 
...
 
Merb::BootLoader.before_app_loads do
  Merb::Slices::config[:merb_auth][:layout] = :application
end
 
...
#router.rb
 
...
 
Merb::Router.prepare do |r|
  # Slices
  # ADD THIS FOR MERB-AUTH
  r.add_slice(:MerbAuth, :path => "", :default_routes => false) 
 
  # RESTful routes
  # r.resources :posts
  # This is the default route for /:controller/:action/:id
  # This is fine for most cases.  If you're heavily using resource-based
  # routes, you may want to comment/remove this line to prevent
  # clients from calling your create or destroy actions with a GET
  r.default_routes
 
  # Change this for your home page to be available at /
  # r.match('/').to(:controller => 'whatever', :action =>'index')
end

|