This project is archived and is in readonly mode.
Raise error when (re)naming columns on migration with ActiveRecord instance method names.
-
Pratik
- Assigned user set to Pratik
- State changed from new to incomplete
Looks good to me. I wonder if we can make use of existing method instance_method_already_implemented? for this. Please catch me in IRC and we'll roll this in.
Thanks!
-
Emilio Tagua
Pratik,
Great suggestion, looks much better now, i believe my previous implementation was before instance_method_already_implemented? was in the core.
-
Frederick Cheung
Would another way around this be to hook method_added and use that? The reason I say that is that typically when I have had this problem it hasn't really been at the point of migration. If I had a column and stuff breaks then I know where to go.
Much harder to diagnose is when a column you already have starts shadowing an important method, for example in one app I had a changed attribute that became problematic when I moved apps to 2.1 (clashes with dirty)
-
Frederick Cheung
Actually that would be really tough because of methods that it's fine to override (before_save, to_xml etc...).
-
Pratik
- Assigned user changed from Pratik to Frederick Cheung
-
Pratik
- Assigned user changed from Frederick Cheung to Pratik
- State changed from incomplete to wontfix
Rethinking this, I don't think it's worth fixing this.
