Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polymorphic attachments #870

Merged
merged 7 commits into from Sep 23, 2013
Merged

Polymorphic attachments #870

merged 7 commits into from Sep 23, 2013

Conversation

gma
Copy link
Contributor

@gma gma commented Sep 19, 2013

@ghost ghost assigned tekin Sep 20, 2013
@tekin
Copy link
Contributor

tekin commented Sep 20, 2013

Nice work, and long overdue! 👍 I will say that we should definitely add a cucumber scenario to cover the happy path for adding an attachment. We were clearly too aggressive in our de-cuking during the last major refactor...

@gma
Copy link
Contributor Author

gma commented Sep 20, 2013

Sure thing, on the cuke, but I wouldn't do it in this PR – the sooner this gets onto master the sooner people stop spending time dealing with the complexity…

Graham Ashton and others added 7 commits September 23, 2013 11:54
We've replaced all five of the separate join models (e.g. EditionAttachment
and SupportingPageAttachment) with a polymorphic association.
The code that initiated the behaviour in Admin::AttachmentActionParamHandler
was duplicated across three controllers, making it easy to fail to
update one of them when the behaviour changed. This commit dries it up,
so any controller that includes the module only needs to call it in a
before filter.
@tekin
Copy link
Contributor

tekin commented Sep 23, 2013

Rebasing with master...

tekin added a commit that referenced this pull request Sep 23, 2013
@tekin tekin merged commit 152a382 into master Sep 23, 2013
@evilstreak evilstreak deleted the polymorphic-attachments branch November 13, 2013 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants