Seed fu and restful_authentication

Hi,

I am trying to use both plugins in my application but I couldn’t get it
to work.

I have included the following in my users.rb(fixtures directory):
user = User.seed(:login) do |s|
s.login = “admin”
s.email = “[email protected]
s.password = “admin”
s.password_confirmation = “admin”
end

The user is inserted in DB but I cannot log into the application.

Any help would be really appreciated.

Thanks

Hi all,

Sorry for reviving a 6 day old e-mail, but I have a similar question
that I can’t seem to figure out.

I’m running restful_authentication with -aasm and I’m looking to seed
my user data such that an e-mail will be sent to the user after
creation to activate the account.

Has anyone done something similar?

On Jul 11, 5:30 am, Marcos C. [email protected]

Hi David,

On Thu, 2009-07-16 at 09:20 -0700, David C. wrote:

Hi all,

Sorry for reviving a 6 day old e-mail, but I have a similar question
that I can’t seem to figure out.

I’m running restful_authentication with -aasm and I’m looking to seed
my user data such that an e-mail will be sent to the user after
creation to activate the account.

Has anyone done something similar?

Check out Bala P.'s simply-rich-authenticator mini app.

http://code.google.com/p/simply-rich-authenticator

HTH,
Bill

Hi Bill,

Thanks for the link.

I’ve looked through the source code but I couldn’t find what I’m looking
for. The app doesn’t seem to be seeding data?

Warmest regards,
David

Hi David,

On Fri, 2009-07-17 at 08:12 +0800, David C. wrote:

Hi Bill,

Thanks for the link.

You’re welcome.

I’ve looked through the source code but I couldn’t find what I’m
looking for. The app doesn’t seem to be seeding data?

Depends on what you mean by ‘seeding’ I guess. It’s not using seed_fu.
But, if I understand (not having used it) what seed-fu does, it does
what Bala’s User.create method does, just in a batch-type mode. Bala’s
UserObserver class takes care of the getting the aasm started and
kicking off the mailer functionality I thought you’re looking for.
Seemed to me like an straight-forward marriage. But maybe I
misunderstood. If so, sorry for the noise.

Best regards,
Bill

Hi Bill,

What if I’m trying to basically skip the activation part (ie. make them
automatically activated) for seeded users?

David

Hi David,

On Sun, 2009-07-19 at 12:07 +0800, David C. wrote:

Hi Bill,

What if I’m trying to basically skip the activation part (ie. make
them automatically activated) for seeded users?

I’m not sure I understand what you’re trying to accomplish, so I’ll have
to respond in generalities.

aasm defines a set of states and allows you to trigger methods when the
object transitions from one state to another. It’s up to you to define
the states, transitions, and methods.

So the question is, what does ‘activated’ mean in your case?

Sorry, but I can’t be more help without more information.

Best regards,
Bill