| Class | BulletinController |
| In: |
app/controllers/bulletin_controller.rb
|
| Parent: | ApplicationController |
| BulletinFolder | = | 'bulletins/' |
# File app/controllers/bulletin_controller.rb, line 37
37: def designers
38: "Co-Designers: Mansi Durga, Richa Bhardwaj, Lubna
39: Arora, Manika Mehta"
40: end
# File app/controllers/bulletin_controller.rb, line 15
15: def extras
16: begin
17: bd=BulletinFolder.chop
18: Dir.mkdir(bd) unless File.directory?(bd)
19: fn= fullname(get_highlighted_choice)
20: open(fn,'w'){} unless File.exist? fn
21: @name= IO.readlines(fn).reject do |l|
22: l !~ /\w/
23: end
24: rescue
25: @name=[]
26: logger.info "unable to open #{fn}"
27: end
28: end
# File app/controllers/bulletin_controller.rb, line 12
12: def fullname (st)
13: BulletinFolder+strip_href(st)+ '.txt'
14: end
# File app/controllers/bulletin_controller.rb, line 9
9: def get_title
10: 'add text to a board'
11: end
# File app/controllers/bulletin_controller.rb, line 29
29: def selected(str)
30: begin
31: str=fullname(str)
32: open(str, 'a') { |f| f.puts session[:text] }
33: rescue
34: logger.info "unable to write to #{str}"
35: end
36: end