Add an option to model generator to generate classes with ActiveRecord::Model #4174

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
7 participants
Owner

guilleiguaran commented Dec 24, 2011

This add an option to model generator to generate classes that use ActiveRecord::Model. Ex:

rails g model Post --with-include

will generate:

class Post
  include ActiveRecord::Model
end

Please don't merge this inmediatly, I think we can choose a better option name than --with-include for this

@guilleiguaran guilleiguaran Add an option to model generator to generate classes with ActiveRecor…
…d::Model include instead of inherit from ActiveRecord::Base
8ae55f0
Member

jonleighton commented Dec 25, 2011

Thanks for the patch.

However, I'm not sure about this:

  • Feels premature, I'd rather wait and see what the take-up on AR::Model is before adding extra 'stuff' for it
  • Not a huge gain - is not much to type out manually
  • Alternatively, we might consider adding an app-wide option in the future instead
  • Alternatively, we might just switch to generating with AR::Model by default in the future, when it is more proven/stable

But, I am biased because I never use generators (except for migrations).

cc @josevalim @tenderlove

Merry christmas! ho ho ho etc :)

Owner

tenderlove commented Dec 25, 2011

TBH, I'd like to see this bake in master for a while before we start adding generators. Right now, I think this is an "advanced users" feature, and I don't think advanced users need / user generators. But that's my 2cents.

Owner

guilleiguaran commented Dec 26, 2011

Agree, we can leave this open and revisit it on the next months

Contributor

isaacsanders commented May 1, 2012

I 👍 this. Any thoughts on this @tenderlove / @wycats?

Member

josevalim commented May 1, 2012

I still think the points given by @jonleighton and @tenderlove still apply. We will only be able to decide this after 4.0 is out.

Hey guys, do we keep this around opened for more time, or should we consider it closed?

Owner

rafaelfranca commented Aug 21, 2012

Lets just close it.

Closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment