-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add manuals #76
Add manuals #76
Conversation
end | ||
|
||
def fetch(manual_id) | ||
edition = ManualEdition.where(manual_id: manual_id).last |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This relies on a co-incidence that the most recently added ManualEdition is the last one in this array.
As chaining on an order would make this difficult to test how about adding a method to the mogoid object like ManualEdition.most_recent_by_manual_id
? Much better to define our API than depend on Mongoid's 289 methods.
Also adding a cucumber test for validation errors working correctly
This avoids the problem of grouping Mongoid documents and pretending it's a relational database
Add curated links to mainstream browse pages
In order to unblock numerous agencies, we need to allow editors to create manuals for their content. This is the first step in that.
In this PR we've added:
#index
for manuals#new
and#edit
pages (with#create
and#update
actions) for manualsThis relies on alphagov/govuk_content_models#165 being merged.