Hey Matt, Is your indexgen branch ready to merge into master?
Thanks, Owen On Oct 13, 11:16 pm, Matt Jones <[email protected]> wrote: > On Oct 13, 2009, at 10:24 PM, tmorgan99 wrote: > > > > > My workaround: > > The yes command with an empty string in the quotes. as follows > > > $ yes '' | script/generate hobo_migration --generate > > > I was looking into it, to see if the migrator could be spun out as a > > stand alone. > > It is almost there in hobofields gem, anyway, however, the hook > > 'hobo_model' lives within the hobo proper gem. > > Actually, hobo_model has very little to do with the migration > generator - it's quite possible to use Hobofields + the MG without the > rest of Hobo. Got a couple apps in the wild right now doing that... :) > > The key factor that decides whether a model is Hobo's problem is the > 'fields' block; it brings much of the rest of the magic in when it's > called. > > > I would be interested to see if I could do such a thing, but going > > through the source, I quickly got stuck in all the magic! > > Could you give me an outline so I could have a go at spinning it out? > > If you grab a copy of edge Hobo from Tom's repo and switch to the > 'indexgen' branch, I think you'll find that the updated migration > generator stops trying to drop all your tables. (It'll also want to > generate DB indexes for a lot of stuff; let me know if you run into > issues) > > > I am working a lot now with the rails template generators, and I find > > they are quite good in laying out the plan of the app. > > For example, the hobo executable itself could be given as a template > > as follows > > > $ rails -m hobo.rb hobo > > > where hobo.rb looks like this: git clone git://gist.github.com/ > > 209727.git > > gist-209727 > > > How's that? > > Even better would be some extension to the hobo command that extends > the template stuff to support hobo-specific things. At the very least > it should be easy to get the hobo executable to pass the -m part to > Rails. That might be something worth looking into... > > --Matt Jones --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Hobo Users" 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/hobousers?hl=en -~----------~----~----~----~------~----~------~--~---
