From 3badd2a910fef2bba969b58ccbd4d289068f0091 Mon Sep 17 00:00:00 2001 From: manson Date: Thu, 10 Apr 2014 17:52:43 +0800 Subject: [PATCH] Added category and fix routing --- app/models/bulletin.rb | 1 + config/routes.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/bulletin.rb b/app/models/bulletin.rb index ae1b349..7addada 100644 --- a/app/models/bulletin.rb +++ b/app/models/bulletin.rb @@ -1,6 +1,7 @@ class Bulletin include Mongoid::Document include Mongoid::Timestamps + include OrbitCategory::Categorizable include Slug field :title, type: String, localize: true diff --git a/config/routes.rb b/config/routes.rb index 1699f8d..8d33e3d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,6 +1,6 @@ Rails.application.routes.draw do - locales = Site.find_by(site_active: true).in_use_locales + locales = Site.first.in_use_locales rescue I18n.available_locales scope "(:locale)", locale: Regexp.new(locales.join("|")) do namespace :admin do