Skip to content

Revert "Fix job location updates" #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/models/opportunity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def set_location_city
begin
locations = self.team.cities.compact.select { |city| self.location.include?(city) }
end while locations.blank? && add_opportunity_locations_to_team && set_location_city
locations.join("|")
self.team.cities.join("|")
end unless self.location.nil?
errors.add(:location, "is not valid, please specify one or more cities separated by | (e.g. Miami, FL | San Francisco). put 'anywhere' if location doesn't matter") if !self.location.nil? and !valid_location_city
self.location_city
Expand Down
2 changes: 1 addition & 1 deletion app/views/opportunities/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
-if @team.team_locations.any?
=j.label :location do
== Select one or more locations where the candidate must be located or #{link_to('add/manage team locations', edit_team_locations_path(@team))}
=j.select(:location, @team.cities+["anywhere"], {:selected => @job.location.split("|")}, {:multiple => true})
=j.select(:location, @team.cities+["anywhere"], {:selected => @job.locations}, {:multiple => true})
-else
=j.label :location, 'Specify the city/location where the candidate must be located'
=j.text_field :location
Expand Down