1
1
class OpportunitiesController < ApplicationController
2
2
before_action :lookup_team , only : [ :activate , :deactivate , :new , :create , :edit , :update , :visit ]
3
3
before_action :lookup_opportunity , only : [ :edit , :update , :activate , :deactivate , :visit ]
4
- before_action :cleanup_params_to_prevent_rocket_tag_error
4
+ before_action :cleanup_params_to_prevent_tagging_error
5
5
before_action :validate_permissions , only : [ :new , :edit , :create , :update , :activate , :deactivate ]
6
6
before_action :verify_payment , only : [ :new , :create ]
7
7
before_action :stringify_location , only : [ :create , :update ]
@@ -131,10 +131,10 @@ def header_ok
131
131
end
132
132
end
133
133
134
- def cleanup_params_to_prevent_rocket_tag_error
135
- if params [ :opportunity ] && params [ :opportunity ] [ :tags ]
136
- params [ :opportunity ] [ :tags ] = "#{ params [ :opportunity ] [ :tags ] } " . split ( ',' ) . map ( &:strip ) . reject ( &:empty? ) . join ( "," )
137
- params [ :opportunity ] [ :tags ] = nil if params [ :opportunity ] [ :tags ] . strip . blank?
134
+ def cleanup_params_to_prevent_tagging_error
135
+ if params [ :opportunity ] && params [ :opportunity ] [ :tag_list ]
136
+ params [ :opportunity ] [ :tag_list ] = "#{ params [ :opportunity ] [ :tag_list ] } " . split ( ',' ) . map ( &:strip ) . reject ( &:empty? ) . join ( "," )
137
+ params [ :opportunity ] [ :tag_list ] = nil if params [ :opportunity ] [ :tag_list ] . strip . blank?
138
138
end
139
139
end
140
140
@@ -151,7 +151,7 @@ def all_job_locations
151
151
end
152
152
153
153
def all_job_skills
154
- Rails . cache . fetch ( 'job_skills' , expires_in : 23 . hours ) { Opportunity . all . flat_map ( &:tags ) . uniq . compact }
154
+ Rails . cache . fetch ( 'job_skills' , expires_in : 23 . hours ) { Opportunity . all . flat_map ( &:tag_list ) . uniq . compact }
155
155
end
156
156
157
157
def closest_to_user ( user )
0 commit comments