
[PATCHED] Remixables only include :default context validations in remixed model (and lose any custom contexts).
Reported by ojak | July 4th, 2009 @ 12:11 AM | in 0.10.0
When using dm-is-remixable, only the default context is ported over to the remixed table.
This patch will port the rest of the context validations over to the newly remixed model.
Comments and changes to this ticket
-
ojak July 4th, 2009 @ 12:22 AM
Sorry, the title is incorrect.
Custom contexts are lost (not custom validations). So the :default context gets ported over while the other contexts are lost.
-
ojak July 4th, 2009 @ 01:20 AM
- Title changed from Remixables only include :default context validations (and lose any custom validations). to Remixables only include :default context validations in remixed model (and lose any custom contexts).
-
ojak July 5th, 2009 @ 08:47 PM
- Title changed from Remixables only include :default context validations in remixed model (and lose any custom contexts). to [PATCHED] Remixables only include :default context validations in remixed model (and lose any custom contexts).
-
Martin Gamsjaeger (snusnu) July 7th, 2009 @ 12:08 PM
- State changed from new to unconfirmed
I think that makes sense
I merged a slightly modified version of your patch into my branch. The only modification I made is that I check if dm-validations are present before doing the work. Without this check, your code would most probably raise errors because of the validators method not being defined. I also added a spec case that fails without your patch but passes with your patch applied
http://github.com/snusnu/dm-more/commit/9f60bc3ff92b828deef5e64708b...
http://github.com/snusnu/dm-more/commit/3e577fed9eab2af9cf33d7c9d51...I hope these get merged
-
Martin Gamsjaeger (snusnu) July 7th, 2009 @ 12:10 PM
- State changed from unconfirmed to confirmed
-
Martin Gamsjaeger (snusnu) July 9th, 2009 @ 11:48 AM
- State changed from confirmed to accepted
- Assigned user changed from Dan Kubb (dkubb) to Martin Gamsjaeger (snusnu)
-
Dan Kubb (dkubb) July 10th, 2009 @ 01:20 PM
- State changed from accepted to resolved
(from [e4a86fe2aba68c0bb48269f8e074564a834b7f2d]) [dm-is-remixable] port over custom validation contexts
-
Previously, the remixed model was only able to use the :default context, because the custom validation contexts were not ported over.
-
This commit is a slightly modified version of Oliver Jakubiec's original patch attached to #946. It only performs work if dm-validations are present.
[#946 state:resolved] http://github.com/datamapper/dm-more/commit/e4a86fe2aba68c0bb48269f...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
People watching this ticket
Attachments
Referenced by
-
693 dm-is-remixable does not remix validations I have a fix for this in my fork of dm-more already which...
-
693 dm-is-remixable does not remix validations I have a fix for this in my fork of dm-more already which...
-
946 [PATCHED] Remixables only include :default context validations in remixed model (and lose any custom contexts). This commit is a slightly modified version of Oliver Jaku...
-
946 [PATCHED] Remixables only include :default context validations in remixed model (and lose any custom contexts). [#946 state:resolved] http://github.com/datamapper/dm-mo...