Refactor globalize models code using a concern

I've chosen the name "Globalizable" because "Translatable" already
existed.
This commit is contained in:
Javi Martín
2018-10-11 02:29:08 +02:00
parent 3b5a12b0ab
commit 2ab49a1832
13 changed files with 20 additions and 24 deletions

View File

@@ -6,8 +6,7 @@ class Poll::Question < ActiveRecord::Base
include ActsAsParanoidAliases
translates :title, touch: true
globalize_accessors
accepts_nested_attributes_for :translations, allow_destroy: true
include Globalizable
belongs_to :poll
belongs_to :author, -> { with_hidden }, class_name: 'User', foreign_key: 'author_id'