Sha256: be210c367a32a153ebe4e45158df1b012f8a0e4d2421d251fb1227cad2978caa
Contents?: true
Size: 593 Bytes
Versions: 6
Compression:
Stored size: 593 Bytes
Contents
require 'active_support/concern' module Georgia module Concerns module Contentable extend ActiveSupport::Concern included do has_many :contents, as: :contentable, dependent: :destroy, class_name: Georgia::Content accepts_nested_attributes_for :contents attr_accessible :contents_attributes def content @content ||= contents.select{|c| c.locale == I18n.locale.to_s}.first || Georgia::Content.new end delegate :title, :text, :excerpt, :keywords, :keyword_list, :image, :locale, to: :content end end end end
Version data entries
6 entries across 6 versions & 1 rubygems