DataMapper, Rails 3.1 How do I skip migrations on a repository a Class? -


i've been searching quite bit (and experimenting monkey patching) solution issue no avail.

i wondering ... how prevent migrations executing on class has datamapper::resource included in it?

in rails app, have few classes connect different repository default. read only. want exclude them auto_migrations happen rake tasks. way can rest assured won't triggering bad behavior on database shouldn't trying migrate. (user permissions err out more proper form imo, databases around here maintained dbas)

this behavior on few models utilize repository separate default repo. still need migrations classes using default repo.

i having feeling easier finding throwing out dm community.

any appreciated!

ugly solution?

klass = toprotect noop = proc {|*|} datamapper::migrations::model.instance_methods.each |meth|   klass.define_method(meth, &noop) end 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -