Added category and fix routing

This commit is contained in:
manson 2014-04-10 17:52:43 +08:00
parent 1cc572e631
commit 3badd2a910
2 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
class Bulletin class Bulletin
include Mongoid::Document include Mongoid::Document
include Mongoid::Timestamps include Mongoid::Timestamps
include OrbitCategory::Categorizable
include Slug include Slug
field :title, type: String, localize: true field :title, type: String, localize: true

View File

@ -1,6 +1,6 @@
Rails.application.routes.draw do 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 scope "(:locale)", locale: Regexp.new(locales.join("|")) do
namespace :admin do namespace :admin do