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

Manual documents #78

Merged
merged 4 commits into from
May 13, 2014
Merged

Manual documents #78

merged 4 commits into from
May 13, 2014

Conversation

bestie
Copy link
Contributor

@bestie bestie commented May 12, 2014

Functionality to add documents (with attachments) to manuals.

You may notice the lovely hack to get around CMA Case specific validations on documents that are currently in the content models gem and also there is some serious work to do refactoring the cucumber steps when we've decided how to separate different types of docs.

EDIT: There's also an awful lot of controller and view duplications that we'll need to refactor soon.

https://trello.com/c/CIVqY1uh/63-manuals-add-document-to-a-manual-5

render_with(
manual: parent_manual,
document: current_document,
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forgive my possible naivety but what is the benefit of using this render_with over just using instance variables?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

render_with or rather render with the locals option forces you to be explicit about what the view has access to where as use of instance variables makes an implicit demand on the state of the controller.

Instance variables are also much trickier to reason about because the controller (or super class) can set them in many places, such as filter methods which means there's no one place you can see what is set.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While having them defined in one place could be desirable I am not sure that I see enough of a benefit to deviating from convention. I know I had to look up to see what this was doing when looking at this pull request. It also isn't even consistently used in this pull request.

@evilstreak evilstreak merged commit 0389c0e into master May 13, 2014
@evilstreak evilstreak deleted the manual-documents branch May 13, 2014 13:44
h-lame pushed a commit that referenced this pull request Apr 13, 2016
…xample

Remove Orgs allowed_values from Policies finder
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.

3 participants