skill-assessment-app/app/helpers/application_helper.rb
2016-08-22 16:26:21 -05:00

30 lines
1.0 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),
%w(Checkbox checkbox),
%w(Coder live_code)
], selected: (val.blank? ? '' : val))
end
end