class SelectorController < ApplicationController def start_choices %w{picbrowser easypic texteditor words abcd nextword presentation recognize wikinext keywords speaker wikipedia nim font emailaddr bulletin crop picedit scroll scrolldown backspace sentences}. collect! do |i| get_modules.include?(i.downcase) ? i.upcase: i.downcase end end def filechoices? false end def first_time session[:modules] ||= ['selector'] session[:choices]=nil redirect_to :action => "index" end def get_separator ',' end def get_title 'make your selection' end def selected(str) if str =~ /[A-Z]/ session[:modules]-= [str.downcase] else session[:modules].insert(1,str) end end end