allow to match category names on import/sync

This commit is contained in:
wvengen 2014-05-21 14:12:38 +02:00
parent 16b78ba2a0
commit d9c61b2db3
8 changed files with 30 additions and 6 deletions

View file

@ -22,6 +22,9 @@ ActiveSupport.on_load(:after_initialize) do
SharedArticle.class_eval do
alias_attribute :number, :order_number
alias_attribute :updated_on, :updated_at
def category
ArticleCategory.find(article_category_id).name
end
def self.find_by_number(n)
find_by_order_number(n)
end