petities/petitions.eu

View on GitHub
app/controllers/pages_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# Serves simple pages
class PagesController < ApplicationController
  before_action :initialize_help_topics, only: :help

  STATIC_PAGES = %w[about help privacy error].freeze

  STATIC_PAGES.each do |name|
    define_method(name) {}
  end

  private

  def initialize_help_topics
    @general = I18n.t('help.general')
    @whilesigning = I18n.t('help.whilesigning')
    @aftersigning = I18n.t('help.aftersigning')
    @writingpetition = I18n.t('help.writingpetition')
  end
end