eshop/app/controllers/application_controller.rb

16 lines
401 B
Ruby

# encoding: UTF-8
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
before_filter :set_stuff
def set_stuff
@menu_categories = Category.where("active = 1")
@menu_infos = Information.where("active = 1 AND type_of = 1")
end
end