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

Add manuals #76

Merged
merged 16 commits into from
May 8, 2014
Merged

Add manuals #76

merged 16 commits into from
May 8, 2014

Conversation

tommyp
Copy link
Contributor

@tommyp tommyp commented May 6, 2014

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 manuals
  • validations for manuals

This relies on alphagov/govuk_content_models#165 being merged.

@tommyp tommyp changed the title Add manuals DO NOT MERGE: Add manuals May 6, 2014
end

def fetch(manual_id)
edition = ManualEdition.where(manual_id: manual_id).last
Copy link
Contributor

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.

@bestie bestie changed the title DO NOT MERGE: Add manuals Add manuals May 8, 2014
evilstreak added a commit that referenced this pull request May 8, 2014
@evilstreak evilstreak merged commit 7a1cc81 into master May 8, 2014
@evilstreak evilstreak deleted the add-manuals branch May 8, 2014 14:16
h-lame pushed a commit that referenced this pull request Apr 13, 2016
Add curated links to mainstream browse pages
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