I've checked that gem before to implement my third-party solution.. https://github.com/mcasimir/active_record_schema, it's very similar to hobo_fields.
I'm not intrested in promote it but to encourage you to at least be doubtful that such a solution is to consider more calmly. Think of the benefits: easier to create reusable code = more gems, easier to switch from other frameworks or ORMS to activerecord, faster and less error-prone development (you can focus on the business first and no the dbms later) and although this will probably not affect you: after spending 2 years monkey-patching mongoid rather i will not spend the next 2 to patch activerecord ;) One last word.. i know this is a little different from what strictly is ActiveRecord approach but it is still ActiveRecord! I always repeat myself to focus on the principles not on rules. With a few line of codes in active_record/migration generator you can achieve a lot of benefits.. would you really throw them away to follow a rule? Thank you very much, i really appreciate your work and your understanding Best regards Maurizio 2012/5/8 Andrew Mutz <[email protected]>: > Clearly this isn't the ActiveRecord approach, where what is in the table is > the authoritative view. If you want to use ActiveRecord in a style where > the models contain the authoritative view, check out the third-party library > HoboFields: > > http://cookbook.hobocentral.net/manual/hobo_fields > > It gives you a DSL to specify the attributes on a model, and will > automatically generate database migrations to make your database reflect > this state. > > -Andrew. > > > On Tue, May 8, 2012 at 8:38 AM, Tim Shaffer <[email protected]> wrote: >> >> Seems like unnecessary duplication if you have to specify the field in a >> migration as well as in the model itself. >> >> What's the point of having to specify the field on the model if it's >> already in the table? Unless there is some other benefit that I am not >> seeing right away. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Core" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/rubyonrails-core/-/H3ZxWdejlX8J. >> >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-core?hl=en. > > > > > -- > Andrew Mutz > Director of Software Engineering > AppFolio, Inc. > > 55 Castilian Dr. | Goleta, CA | 93117 > Phone: 805.617.2167 | Fax: 805.968.0646 > [email protected] > www.appfolio.com > ------------------------------------------------------------------------------------- > "Web-Based Property Management Software Made Easy." > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
