contact page new

This commit is contained in:
2014-07-23 22:57:14 +05:30
committed by Andreas Stephanides
parent 360f6880fe
commit 5bf20e1a98
11 changed files with 87 additions and 47 deletions

View File

@@ -8,6 +8,8 @@ class HomeController < ApplicationController
end
def kontakt
t=YAML.load_file("#{::Rails.root.to_s}/config/contact_topic.yml")
@themen = Thema.where(:id=>t)
end
def intern
authorize! :seeintern, User
@@ -51,4 +53,9 @@ class HomeController < ApplicationController
format.js
end
end
def choose_contact_topics
File.open("config/contact_topic.yml",'w'){|f| f.write(params[:themen].to_yaml)}
redirect_to admin_home_index_path
end
end