This repository was archived by the owner on Mar 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -146,20 +146,17 @@ def set_job
146
146
end
147
147
148
148
def filter_by_params ( user = nil )
149
- if user . nil?
150
- user_jobs = Job . all
151
- else
152
- user_jobs = Job . user_jobs ( user )
153
- end
149
+ user_jobs = user . nil? ? Job . all : Job . user_jobs ( user )
154
150
state_params = params [ :state ]
155
151
156
- if state_params == 'user'
152
+ case state_params
153
+ when 'user'
157
154
@jobs = user_jobs
158
- elsif state_params == 'draft'
155
+ when 'draft'
159
156
@jobs = user_jobs . draft_jobs
160
- elsif state_params == 'pending'
157
+ when 'pending'
161
158
@jobs = user_jobs . pending_jobs
162
- elsif state_params == 'expired'
159
+ when 'expired'
163
160
@jobs = user_jobs . expired_jobs
164
161
end
165
162
end
Original file line number Diff line number Diff line change @@ -211,15 +211,14 @@ def to_text_for_social_media
211
211
text = "#{ self . company_name . titleize } is looking to hire a #{ self . title } "
212
212
text += " in #{ self . location_name } " unless self . location_name . blank?
213
213
text += ". More information here https://#{ AppSettings . application_host } /jobs/#{ self . to_param } "
214
+
214
215
return text
215
216
end
216
217
217
218
def to_text_for_twitter
218
219
text = "text=#{ self . company_name . titleize } is looking to hire a #{ self . title } "
219
220
text += " in #{ self . location_name } " unless self . location_name . blank?
220
- text += ". More information here"
221
- text += "&url=https://#{ AppSettings . application_host } /jobs/#{ self . to_param } "
222
- text += "&hashtags=#{ self . location_name } "
221
+ text += ". More information here&url=https://#{ AppSettings . application_host } /jobs/#{ self . to_param } &hashtags=#{ self . location_name } "
223
222
if !self . twitter_handle . blank?
224
223
if self . twitter_handle . start_with? ( '@' )
225
224
text += ( " " + self . twitter_handle )
You can’t perform that action at this time.
0 commit comments