fix test, clientid or campaign.clientid gets you a campaign
This commit is contained in:
parent
6370dcab69
commit
22d789837d
@ -54,7 +54,11 @@ class CampaignsController < ApplicationController
|
|||||||
private
|
private
|
||||||
def set_campaign
|
def set_campaign
|
||||||
clientid = params[:clientid].to_s.gsub(/\D/, '').to_i
|
clientid = params[:clientid].to_s.gsub(/\D/, '').to_i
|
||||||
@campaign = Campaign.find_by_clientid(clientid) || Campaign.find_by_clientid(params[:campaign][:clientid]) || not_found
|
if params[:campaign]
|
||||||
|
@campaign = Campaign.find_by_clientid(params[:campaign][:clientid]) || not_found
|
||||||
|
else
|
||||||
|
@campaign = Campaign.find_by_clientid(clientid) || not_found
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def campaign_params
|
def campaign_params
|
||||||
|
Loading…
Reference in New Issue
Block a user