Mongoid v3 support #928

Closed
brycemcd opened this Issue Sep 7, 2012 · 3 comments

Comments

Projects
None yet
3 participants
@brycemcd

brycemcd commented Sep 7, 2012

I looked through the issues and didn't see anything for mongoid v3 support. I just started hacking on a padrino project using the mongoid ORM and ran into some trouble. It looks like the project generators wrt to mongoid are a little out of date.

I'm happy to make the changes and submit a pull request, but before I jumped in I thought I'd see if someone was already working on this.

@nesquena

This comment has been minimized.

Show comment
Hide comment
@nesquena

nesquena Sep 7, 2012

Member

I think in head we do support mongoid v3 https://github.com/padrino/padrino-framework/blob/master/padrino-gen/lib/padrino-gen/generators/components/orms/mongoid.rb although if you want to tweak the generators to improve them further, then that would be great. I used the generator in my last project and mongoid 3 seemed to be working OK though.

Member

nesquena commented Sep 7, 2012

I think in head we do support mongoid v3 https://github.com/padrino/padrino-framework/blob/master/padrino-gen/lib/padrino-gen/generators/components/orms/mongoid.rb although if you want to tweak the generators to improve them further, then that would be great. I used the generator in my last project and mongoid 3 seemed to be working OK though.

@brycemcd

This comment has been minimized.

Show comment
Hide comment
@brycemcd

brycemcd Sep 7, 2012

Sounds like it's a good idea that I asked first :)

Whenever I've implemented mongoid, I've trended towards using the yaml file to define the db connections. The format of this file changed in v3 (http://mongoid.org/en/mongoid/docs/installation.html) and my plan was just to re-write the generator to save a mongoid.yml file to the config directory with some sensible default values and then configure database.rb to load the yaml file as outlined in the v3 documentation.

I'm very new to padrino and the change would likely break mongoid < 3.0 builds. However, if this sounds like something you'd like done, I'd be happy to get it into a PR for you

brycemcd commented Sep 7, 2012

Sounds like it's a good idea that I asked first :)

Whenever I've implemented mongoid, I've trended towards using the yaml file to define the db connections. The format of this file changed in v3 (http://mongoid.org/en/mongoid/docs/installation.html) and my plan was just to re-write the generator to save a mongoid.yml file to the config directory with some sensible default values and then configure database.rb to load the yaml file as outlined in the v3 documentation.

I'm very new to padrino and the change would likely break mongoid < 3.0 builds. However, if this sounds like something you'd like done, I'd be happy to get it into a PR for you

@WaYdotNET

This comment has been minimized.

Show comment
Hide comment
@WaYdotNET

WaYdotNET Sep 7, 2012

Contributor

Padrino work well with mongoid >=3.0 and 2.0 (but you use git version, not gem )

edit:

in your Gemfile

# gem padrino,'0.10.7'
gem 'padrino', :git => 'git://github.com/padrino/padrino-framework.git'
Contributor

WaYdotNET commented Sep 7, 2012

Padrino work well with mongoid >=3.0 and 2.0 (but you use git version, not gem )

edit:

in your Gemfile

# gem padrino,'0.10.7'
gem 'padrino', :git => 'git://github.com/padrino/padrino-framework.git'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment