enable i18n for the category custom type

This commit is contained in:
did 2011-09-14 16:37:20 +02:00
parent 0b27cd5d1b
commit b89d6f2dbd
2 changed files with 8 additions and 1 deletions

View File

@ -9,6 +9,7 @@ require 'locomotive/dragonfly'
require 'locomotive/liquid'
require 'locomotive/mongoid'
require 'locomotive/carrierwave'
require 'locomotive/i18n'
require 'locomotive/custom_fields'
require 'locomotive/httparty'
require 'locomotive/inherited_resources'
@ -22,7 +23,6 @@ require 'locomotive/delayed_job'
require 'locomotive/middlewares'
require 'locomotive/session_store'
require 'locomotive/hosting'
require 'locomotive/i18n'
module Locomotive

View File

@ -23,6 +23,13 @@ module CustomFields
module Category
class Item
include Mongoid::I18n
localized_fields :name, :position
field :name
field :position, :type => Integer, :default => 0
def to_liquid
{ 'id' => self._id.to_s, 'name' => self.name }
end