Ruby on Rails Sunday, August 29, 2010


On 29 Aug 2010, at 21:37, nobosh wrote:

Is there an authentication plug-in that supports that? ie
1. Registration that is email based (no usernames)

If it isn't the default, it's certainly an option in the most popular authentication plugins out there: AuthLogic and Devise. Which one to choose depends on how you feel sessions should be managed and what API you prefer.

Personally, I think the Rack environment is a good place to maintain sessions, especially if you might use other Rack-based apps that need to tie into an authenticated session. That's why I use Devise.

Authlogic feels that a session is in fact a model, much similar to other models in Rails. It's certainly a very nice gem, with lots of features and very reliable.

2. Users are assigned to an instance based on their email domain, and
only see data that is associated to their instance.

That's your job, you just make the necessary model relationships to handle it.

Lastly, as I'm new should I start with Rails 3 or stick with Rails
2.3? From what I can tell
Pro of Rails 3: I can learn fresh from the start
Con of Rails 3: Plugins are all for Rails 2+

Don't let plugins hold you back, most of the ones you'll need either have a rails 3 compatible version available or at least a branch on github that supports Rails 3. That includes the two authentication gems I talked about a bit earlier.

Quite a lot of syntax and features in Rails 3 are quite different from Rails 2 though, so you'll be limited to some specific blog posts and the RoR docs themselves.


Best regards


Peter De Berdt


No comments:

Post a Comment