Change configuration to sqlite database.
[ecs.git] / app / controllers / config_controller_bak.rb
blobd2cc3ce1f151c90c6315ca89cfc8f8c58eba8025
1 class ConfigController < ApplicationController
3   require 'json/add/rails'
5   before_filter :authentication
6   before_filter :add_cookie_header # only for anonymous participants
8   def initialize
9     super
10   end
12   def index
13     config_render
14   end
16   def create
17   end
19 private
21   def config_render
22     config = nil
23     config_txt = ""
24     config= \
25       { 
26         :events => @participant.events?.to_s
27       }
28     respond_to do |format|
29       format.json { render :json  => JSON.pretty_generate(config) }
30       format.xml  { render :xml   => config }
31     end
32   end
34 end