Class: ConfigSerializer

Inherits:
ActiveModel::Serializer
  • Object
show all
Defined in:
app/serializers/config_serializer.rb

Instance Method Summary collapse

Instance Method Details

#foodsoftObject



15
16
17
18
19
20
21
# File 'app/serializers/config_serializer.rb', line 15

def foodsoft
  {
    version: Foodsoft::VERSION,
    revision: Foodsoft::REVISION,
    url: object[:foodsoft_url]
  }
end


23
24
25
26
27
28
29
30
31
32
# File 'app/serializers/config_serializer.rb', line 23

def page_footer_html
  # also see footer layout
  if FoodsoftConfig[:page_footer].present?
    FoodsoftConfig[:page_footer]
  elsif FoodsoftConfig[:homepage].present?
    ActionController::Base.helpers.link_to(FoodsoftConfig[:name], FoodsoftConfig[:homepage])
  else
    FoodsoftConfig[:name]
  end
end

#webstats_tracking_code_htmlObject



34
35
36
# File 'app/serializers/config_serializer.rb', line 34

def webstats_tracking_code_html
  FoodsoftConfig[:webstats_tracking_code].presence
end