skill-assessment-app/app/helpers/application_helper.rb
2016-08-31 16:59:25 -05:00

32 lines
1.1 KiB
Ruby

module ApplicationHelper
def experience_options val
options_for_select([
["Please select", ""],
["0-3 Years", "0-3"],
["4-6 Years", "4-6"],
["7-9 Years", "7-9"],
["10-14 Years", "10-14"],
["15+ Years", "15+"]
], disabled: "-", selected: (val.blank? ? '' : val))
end
def admin_role_options val
options_for_select([
%w(Reviewer reviewer),
%w(Recruiter recruiter),
%w(Admin admin)
], disabled: "-", selected: (val.blank? ? '' : val))
end
def question_type_options val
options_for_select([
%w(Text text),
%w(Radio radio),
['Radio with other', 'radio_other'],
%w(Checkbox checkbox),
['Checkbox with other', 'checkbox_other'],
%w(Coder live_code)
], selected: (val.blank? ? '' : val))
end
end