rails-caf/app/controllers/home_controller.rb

13 lines
293 B
Ruby

class HomeController < ApplicationController
def index
if user_signed_in?
if current_user.admin?
@file = YAML.load_file(Rails.root.to_s + '/config/caf_text.yml')
else
end
end
@companies = Company.all
end
end