Module: Recruiter::FormHelper
- Defined in:
- app/helpers/recruiter/form_helper.rb
Instance Method Summary collapse
- #options_for(scope) ⇒ Object
- #options_for_available_cities(state_id) ⇒ Object
- #options_for_available_states ⇒ Object
- #options_for_cities(state_id = nil) ⇒ Object
- #options_for_states ⇒ Object
- #tags ⇒ Object
Instance Method Details
#options_for(scope) ⇒ Object
19 20 21 22 23 |
# File 'app/helpers/recruiter/form_helper.rb', line 19 def (scope) scope.order(:name).select(:name, :id).map do |row| [row.name, row.id] end end |
#options_for_available_cities(state_id) ⇒ Object
11 12 13 |
# File 'app/helpers/recruiter/form_helper.rb', line 11 def (state_id) City.with_open_jobs.where(state_id: state_id) end |
#options_for_available_states ⇒ Object
7 8 9 |
# File 'app/helpers/recruiter/form_helper.rb', line 7 def (State.with_open_jobs) end |
#options_for_cities(state_id = nil) ⇒ Object
15 16 17 |
# File 'app/helpers/recruiter/form_helper.rb', line 15 def (state_id = nil) City.where(state_id: state_id) end |
#options_for_states ⇒ Object
3 4 5 |
# File 'app/helpers/recruiter/form_helper.rb', line 3 def (State) end |
#tags ⇒ Object
25 26 27 |
# File 'app/helpers/recruiter/form_helper.rb', line 25 def Tag.order(:sequence) end |