Rails 3, ActiveModel, and Devise

163 views
Skip to first unread message

Sean McCleary

unread,
Jul 18, 2010, 8:10:09 PM7/18/10
to MongoMapper
I have been using Rails 3, Devise, and Mongoid, but I'm really not
liking how Mongoid handles collection relationships. I would like to
give MongoMapper a try, but there were a couple things I was not sure
of.

1. Is MongoMapper ready for Rails 3 and ActiveModel?
2. Are people using Rails 3, MongoMapper, and Devise?

I think I remember reading that Devise dropped support for MongoMapper
in favor of Mongoid due to MongoMapper's lack of ActiveModel support.
I'm just trying to figure out if this is still the case.

Joe Van Overberghe

unread,
Jul 18, 2010, 8:35:43 PM7/18/10
to mongo...@googlegroups.com
Mongomapper will not support Rails 3 until it is released. John does not want to support both 2.x and 3 at the same time. The sticking point is ActiveModel, which only works in Rails 3.

Joe Van Overberghe
---------
Sent from my iPhone

> --
> You received this message because you are subscribed to the Google
> Groups "MongoMapper" group.
> For more options, visit this group at
> http://groups.google.com/group/mongomapper?hl=en?hl=en

Sean McCleary

unread,
Jul 18, 2010, 9:05:09 PM7/18/10
to MongoMapper
Thank you, Joe. That is the answer I was afraid of. Looks like I'm
stuck with Mongoid for now.

-- Sean McCleary

On Jul 18, 5:35 pm, Joe Van Overberghe <joev...@gmail.com> wrote:
> Mongomapper will not support Rails 3 until it is released. John does not want to support both 2.x and 3 at the same time. The sticking point is ActiveModel, which only works in Rails 3.
>
> Joe Van Overberghe
> ---------
> Sent from my iPhone
>

Nathan Stults

unread,
Jul 19, 2010, 1:29:42 AM7/19/10
to mongo...@googlegroups.com
For what it's worth, our latest app is Rails 3, Devise & Mongo Mapper, and everything seems to work pretty OK. We are using a fork of Devise which enables MM as an ORM, but I don't suppose that will be required forever.

http://github.com/BadMinus/devise.git

Sean McCleary

unread,
Jul 19, 2010, 2:55:25 AM7/19/10
to MongoMapper
Thanks, Nathan.

I may give that a try; however, I remain reluctant to rely on
MongoMapper for Rails 3 until it has ActiveModel support.

-- Sean McCleary

On Jul 18, 10:29 pm, "Nathan Stults" <Nathan_Stu...@HSIHealth.com>
wrote:

John Nunemaker

unread,
Jul 19, 2010, 11:29:07 AM7/19/10
to mongo...@googlegroups.com
Rails 3, yes. Several people have Rails 3 apps with MongoMapper. No, it does not currently work with devise. The transition to AM should happen in the next few months as Rails 3 gets closer to release.

John Nunemaker

unread,
Jul 19, 2010, 11:29:49 AM7/19/10
to mongo...@googlegroups.com
Yep, Jose has emailed me and when MM switched to AM it will be back in devise.

BadMinus

unread,
Jul 20, 2010, 9:49:41 PM7/20/10
to MongoMapper
When you using my fork of devise, you use my forks of MM and
validatable?
Just one question when you testing app validations work properly?

When I test this test gives me error and don't know what to do.

@person =
Person.create(:email=>"em...@test.com",:password=>"12345678",:password_confirmation=>"12345678")
@person.should be_valid

# lib/validatable/validations/validation_base.rb:61:in
`raise_error_if_key_is_dup': key Person/
Validatable::ValidatesPresenceOf/email must be unique, provide
the :key option to specify a unique key (ArgumentError)

When i'm in app console. Everything work. Maybe it's because testing
environment loads model twice.

On Jul 19, 9:29 am, "Nathan Stults" <Nathan_Stu...@HSIHealth.com>
wrote:

BadMinus

unread,
Jul 20, 2010, 9:53:30 PM7/20/10
to MongoMapper
2 minutes later :)

I'm set config.cache_classes = false in test environment and it's
works. Can someone explain me why this happened?

Aaron

unread,
Jul 22, 2010, 12:06:40 AM7/22/10
to MongoMapper
I've used rails3, MM and devise together.
need little modification on devise's adapter, overall worked fine

Adilson Chacon

unread,
Jul 22, 2010, 8:41:41 AM7/22/10
to mongo...@googlegroups.com
Aaron,

Me too!

> --
> You received this message because you are subscribed to the Google
> Groups "MongoMapper" group.
> For more options, visit this group at
> http://groups.google.com/group/mongomapper?hl=en?hl=en

--
Adilson Chacon
site: http://www.adilsonchacon.com
twitter: http://www.twitter.com/adilsonchacon
email: adilso...@gmail.com

Aaron

unread,
Jul 29, 2010, 9:27:43 PM7/29/10
to MongoMapper
my crafted adapter http://gist.github.com/499665

worked with rails3 rc, MM 0.8.2 and devise 1.1.1

On Jul 22, 12:06 pm, Aaron <aaron...@gmail.com> wrote:
> I've used rails3, MM anddevisetogether.
> need little modification ondevise'sadapter, overall worked fine
>
> On Jul 19, 8:10 am, Sean McCleary <sean...@gmail.com> wrote:
>
>
>
> > I have been using Rails 3,Devise, and Mongoid, but I'm really not
> > liking how Mongoid handles collection relationships.  I would like to
> > give MongoMapper a try, but there were a couple things I was not sure
> > of.
>
> > 1. Is MongoMapper ready for Rails 3 and ActiveModel?
> > 2. Are people using Rails 3, MongoMapper, andDevise?
>
> > I think I remember reading thatDevisedropped support for MongoMapper
Reply all
Reply to author
Forward
0 new messages