2014-04-07 18:41:34 +00:00
|
|
|
module ApplicationHelper
|
2014-04-22 17:44:49 +00:00
|
|
|
def voiceoverselection_list(options={})
|
2014-04-21 17:42:57 +00:00
|
|
|
voiceoverselections = []
|
|
|
|
voiceoverselections << ["1 - Male", 1]
|
|
|
|
voiceoverselections << ["2 - Female", 2]
|
|
|
|
voiceoverselections << ["3 - No Preference", 3]
|
2014-04-22 20:49:09 +00:00
|
|
|
return options.empty? ? voiceoverselections : convert_to_hash(voiceoverselections)[options[:item]]
|
2014-04-21 17:42:57 +00:00
|
|
|
end
|
|
|
|
|
2014-04-22 17:44:49 +00:00
|
|
|
def musicselection_list(options={})
|
2014-04-21 17:42:57 +00:00
|
|
|
musicselections = []
|
|
|
|
musicselections << ["0 - No Preference", 0]
|
|
|
|
musicselections << ["1 - Easy", 1]
|
|
|
|
musicselections << ["2 - Jazzy", 2]
|
|
|
|
musicselections << ["3 - High Energy", 3]
|
|
|
|
musicselections << ["4 - New Age", 4]
|
|
|
|
musicselections << ["5 - Positive", 5]
|
|
|
|
musicselections << ["6 - Rock", 6]
|
2014-04-22 20:49:09 +00:00
|
|
|
return options.empty? ? musicselections : convert_to_hash(musicselections)[options[:item]]
|
2014-04-22 17:44:49 +00:00
|
|
|
end
|
|
|
|
|
2014-04-22 19:42:39 +00:00
|
|
|
def us_states(options={})
|
|
|
|
states = [
|
2014-04-22 17:44:49 +00:00
|
|
|
['Alabama', 'AL'],
|
|
|
|
['Alaska', 'AK'],
|
|
|
|
['Arizona', 'AZ'],
|
|
|
|
['Arkansas', 'AR'],
|
|
|
|
['California', 'CA'],
|
|
|
|
['Colorado', 'CO'],
|
|
|
|
['Connecticut', 'CT'],
|
|
|
|
['Delaware', 'DE'],
|
|
|
|
['District of Columbia', 'DC'],
|
|
|
|
['Florida', 'FL'],
|
|
|
|
['Georgia', 'GA'],
|
|
|
|
['Hawaii', 'HI'],
|
|
|
|
['Idaho', 'ID'],
|
|
|
|
['Illinois', 'IL'],
|
|
|
|
['Indiana', 'IN'],
|
|
|
|
['Iowa', 'IA'],
|
|
|
|
['Kansas', 'KS'],
|
|
|
|
['Kentucky', 'KY'],
|
|
|
|
['Louisiana', 'LA'],
|
|
|
|
['Maine', 'ME'],
|
|
|
|
['Maryland', 'MD'],
|
|
|
|
['Massachusetts', 'MA'],
|
|
|
|
['Michigan', 'MI'],
|
|
|
|
['Minnesota', 'MN'],
|
|
|
|
['Mississippi', 'MS'],
|
|
|
|
['Missouri', 'MO'],
|
|
|
|
['Montana', 'MT'],
|
|
|
|
['Nebraska', 'NE'],
|
|
|
|
['Nevada', 'NV'],
|
|
|
|
['New Hampshire', 'NH'],
|
|
|
|
['New Jersey', 'NJ'],
|
|
|
|
['New Mexico', 'NM'],
|
|
|
|
['New York', 'NY'],
|
|
|
|
['North Carolina', 'NC'],
|
|
|
|
['North Dakota', 'ND'],
|
|
|
|
['Ohio', 'OH'],
|
|
|
|
['Oklahoma', 'OK'],
|
|
|
|
['Oregon', 'OR'],
|
|
|
|
['Pennsylvania', 'PA'],
|
|
|
|
['Puerto Rico', 'PR'],
|
|
|
|
['Rhode Island', 'RI'],
|
|
|
|
['South Carolina', 'SC'],
|
|
|
|
['South Dakota', 'SD'],
|
|
|
|
['Tennessee', 'TN'],
|
|
|
|
['Texas', 'TX'],
|
|
|
|
['Utah', 'UT'],
|
|
|
|
['Vermont', 'VT'],
|
|
|
|
['Virginia', 'VA'],
|
|
|
|
['Washington', 'WA'],
|
|
|
|
['West Virginia', 'WV'],
|
|
|
|
['Wisconsin', 'WI'],
|
|
|
|
['Wyoming', 'WY']
|
|
|
|
]
|
2014-04-22 20:49:09 +00:00
|
|
|
return options.empty? ? states : convert_to_hash(states)[options[:item]]
|
2014-04-21 17:42:57 +00:00
|
|
|
end
|
2014-04-22 17:44:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
private
|
|
|
|
def convert_to_hash(list)
|
|
|
|
list.map!{|x| x= x[1],x[0]}
|
|
|
|
return Hash[*list.flatten]
|
|
|
|
end
|
|
|
|
|
2014-04-07 18:41:34 +00:00
|
|
|
end
|