You are not logged in.

#1 2006-04-02 23:03:08

viniosity
Member
From: New York, NY
Registered: 2005-01-22
Posts: 378
Website

Ruby/Rails - register user with email challenge

I want to start a new web-based project in Ruby on Rails. One of the features I want is for people to register on the site but then have the site send them an email to confirm it is valid.  Can anyone suggest how I should start?  Are there components/plugins/engines I should look at that can cut some of the development time?

Offline

#2 2006-04-04 11:13:48

Sander
Member
Registered: 2006-02-26
Posts: 137

Re: Ruby/Rails - register user with email challenge

ActionMailer should do what you want.


You like cheese? You like peas? You'll love cheezy peas!

Offline

#3 2006-04-04 12:56:31

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: Ruby/Rails - register user with email challenge

Making sure the user is verified should be easy enough once you figure out how to mail them...you can just make a flag in the database to show that they're approved.  I'd probably generate a random confirmation key of some sort, email them that key, and then have them enter the key into a confirmation form.  If they match, flag them as confirmed and allow them to log in...

Offline

#4 2006-04-04 20:05:46

viniosity
Member
From: New York, NY
Registered: 2005-01-22
Posts: 378
Website

Re: Ruby/Rails - register user with email challenge

I found the login engine (relies on actionmailer) which I *think* will do all this:

http://svn.rails-engines.org/plugins/lo … ine/README

I'm a bit confused as to how to set up my mysql database though.  There is a section in the readme that says:

=== Create the DB schema

After you have done the modifications the the ApplicationController and its helper, you can import the user model into the database. An ActiveRecord schema.rb file is provided in login_engine/db/schema.rb, along with migration information in login_engine/db/migrate/.

Not sure what to make of that.. I'm used to getting a .sql file that I can import into MySQL.  Anyone have any experience with this?

Offline

#5 2006-04-04 21:39:13

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: Ruby/Rails - register user with email challenge

Looks like they're using ActiveRecord Migrations.  It's actually a very good feature to help keep things database agnostic and is an easy way to manage database changes/updates over time (including the ability to rollback to previous database schemas).  Try googling around for 'ruby on rails migrations' or 'migrations schema.rb' and you'll find a ton of decent articles on how to use it.

Offline

Board footer

Powered by FluxBB