Class KeywordsController
In: app/controllers/keywords_controller.rb
Parent: ApplicationController

Methods

extras   get_title   selected  

Constants

ChoicesFile = 'menus/keywordschoices.txt'

Public Instance methods

enhances @choices with the text already typed

[Source]

    # File app/controllers/keywords_controller.rb, line 7
 7:         def extras
 8:                 session[:choices]=(@choices <<
 9:                         get_text.strip).uniq!
10:                 reformat_choices
11:         end

[Source]

   # File app/controllers/keywords_controller.rb, line 3
3:   def get_title
4:                 'select keywords for wikinext'
5:         end

adds the selected line to keywordschoices.txt unless that is redundant

[Source]

    # File app/controllers/keywords_controller.rb, line 14
14:         def selected(str)
15:                 session[:keywords]=str
16:                 if !IO.read(ChoicesFile).match(str)
17:                         File.open(ChoicesFile,'a') do |f|
18:                                 f.puts str
19:                         end
20:                 end
21:         end

[Validate]