Class: Spyro::ActionViewExtension::CollectionForHelper::Output::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/spyro/collections/outputs/base.rb

Direct Known Subclasses

BarGraphTable, CSV, Map, Table, XLSX

Instance Method Summary collapse

Constructor Details

#initialize(unicollection, helper, parser_class) ⇒ Base

Returns a new instance of Base.



10
11
12
13
14
# File 'lib/spyro/collections/outputs/base.rb', line 10

def initialize unicollection, helper, parser_class
  @unicollection = unicollection
  @h = helper
  @parser_class = parser_class
end

Instance Method Details

#t(name) ⇒ Object



16
17
18
# File 'lib/spyro/collections/outputs/base.rb', line 16

def t name
  I18n.t("#{params[:controller].gsub('/', '.')}.#{params[:action]}.table.#{name.downcase}", :default => I18n.t("scaffold.table.#{name.downcase}", :default => name.to_s.humanize))
end