Friday, January 18, 2008

Merbful Authentication Update

There have been a couple of little teething problems with the merbful_authentication gem, mostly because it's not automatically available to your app when you run the generators. There's all that you had to do to get going which really bugged me.

The Skinny

To setup your newly generated Authenticated user, now all you need to do is setup the routes. (and the mailer if your using activation). All the including and dependency is taken care of for you. This is current as of 0.1.2. If you care about why and how... read on.

Why and How

The main issues were with the controllers not having the mixin by default. Then when you try and include it you have to make it a dependency. Not very nice... I also kept getting tripped up on the merb_helpers dependency too.

Well you'll be pleased to know that now, when you generate an authenticated user and you app loads, all the authenticated system is mixed into Application. The controller that your controllers should all inherit from. So it's now available to all your controller automatically :)

Also merb_helpers has been made a dependency where it's needed, and also a dependency on the gem so you don't have to worry about it. Ahhh... gem plugins are so nice like that.

It's up on rubyforge so sudo gem install merbful_authentication should do the job.

If you want source with that see my other post for instructions on where to get it.

Happy Hacking!