Sha256: da47e6801bb18a4058b958059cabd3f8789c7edad3a2c17bb03cc8260608b721

Contents?: true

Size: 490 Bytes

Versions: 5

Compression:

Stored size: 490 Bytes

Contents

# NOTE: this will soon be moved to cells-rails.
module Cell::Translation
  def self.included(includer)
    super
    includer.inheritable_attr :translation_path
  end

  def initialize(*)
    super
    @virtual_path = translation_path
  end

private
  # If you override this to change this path, please report it on the trailblazer/chat gitter channel,
  # so we can find out best practices.
  def translation_path
    self.class.translation_path or controller_path.gsub("/", ".")
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
cells-rails-0.0.3 lib/cell/translation.rb
cells-rails-0.0.2 lib/cell/translation.rb
cells-4.0.5 lib/cell/translation.rb
cells-4.0.4 lib/cell/translation.rb
cells-4.0.3 lib/cell/translation.rb