Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
View
3  app/models/artefact.rb
@@ -25,6 +25,9 @@ class Artefact
field "tag_ids", type: Array, default: []
field "primary_section", type: String
+ index "tag_ids"
+ index "primary_section"
+
MAXIMUM_RELATED_ITEMS = 8
FORMATS = [
View
35 app/models/section.rb
@@ -1,35 +0,0 @@
-class Section
-
- def initialize(top_level, name)
- @top_level = top_level
- @name = name
- end
-
- def slug
- [@top_level, @name].join(":")
- end
-
- def to_s
- [@top_level, @name].join(" > ")
- end
-
- class << self
- def all
- @sections ||= load_sections
- end
-
- private
- def load_sections
- top_level = nil
- File.open(File.expand_path("../sections.txt", __FILE__)).inject([]) { |sections, line|
- if line =~ /^ /
- raise "Bad section.txt, must start with a section (no spaces at start of first line)" if top_level.nil?
- sections << new(top_level, line.strip)
- else
- top_level = line.strip
- sections
- end
- }
- end
- end
-end
View
89 app/models/sections.txt
@@ -1,89 +0,0 @@
-Crime and justice
- Reporting crime
- Terrorism and extremism
- The police
- Courts
- Sentencing
- Prisons and probation
- Complaints
- Young people and crime
- Your neighbourhood
- Victims of crime
-Education
- School admissions
- In school
- Special educational needs
- Student money
- Further and higher education
- Adult learning
- Libraries
-Work
- Finding a job
- Starting work
- Types of employment
- Employment rights
- Time off work
- Health and safety at work
- Work-related benefits and schemes
- Ending work
- Sickness
-Family
- Maternity and paternity
- Parenting
- Adoption and fostering
- Divorce and separation
- Death and bereavement
- Children
- Registering life events
- Marriage and civil partnership
- Mental capacity and the law
-Money and tax
- Children
- Home
- Disability and carers
- Tax credits
- Pensions
- Debt and bankruptcy
- Tax
- Winter payments
-Driving
- Learning to drive
- Your driving licence
- Vehicle tax
- Buying and selling a vehicle
- MOT
- Owning a car or motorbike
- Driving and your neighbourhood
- Driving and the law
- Driving courses
-Housing
- Emergency housing
- Council Tax
- Council and Housing Association homes
- Local council services
- Housing problems and issues
- Housing benefits, grants and schemes
- Planning and building
- Refuse and disposal
- Your home
- Buying and selling a home
- Renting a home
-Life in the UK
- The monarchy
- How government works
- Voting
- Rights and citizenship
-Travel
- Foreign travel
- Air travel
- Passports
- Animals, food and plants
- Moving and living abroad
- Domestic travel
-Neighbourhoods
- Community and local services
- Libraries and learning
- Charities and volunteering
- Council services
- Reporting a problem
- Parks and open spaces
View
1  app/models/tag.rb
@@ -5,6 +5,7 @@ class Tag
field :tag_type, type: String #TODO: list of accepted types?
index :tag_id, unique: true
+ index :tag_type
validates_presence_of :tag_id, :title, :tag_type

No commit comments for this range

Something went wrong with that request. Please try again.