class BulletinController < ApplicationController BulletinFolder='bulletins/' # def first_time # session[:separator]=',' # redirect_to :action => "index" def start_choices %w{school games demo food} end def get_title 'add text to a board' end def fullname (st) BulletinFolder+strip_href(st)+ '.txt' end def extras begin bd=BulletinFolder.chop Dir.mkdir(bd) unless File.directory?(bd) fn= fullname(get_highlighted_choice) open(fn,'w'){} unless File.exist? fn @name= IO.readlines(fn).reject do |l| l !~ /\w/ end rescue @name=[] logger.info "unable to open #{fn}" end end def selected(str) begin str=fullname(str) open(str, 'a') { |f| f.puts session[:text] } rescue logger.info "unable to write to #{str}" end end def designers "Co-Designers: Mansi Durga, Richa Bhardwaj, Lubna Arora, Manika Mehta" end end