On Mon, Mar 12, 2018 at 7:31 AM, Daynthan Kabilan <
dayan...@gmail.com> wrote:
> I have two controllers
>
> 1, api/risk_profiles
> 2, admin/risk_profiles
>
> When i submitted a form then a new record was created in 'api/risk_profiles'
> controller and the action name 'create'.
>
> Now, i want to redirect to 'admin/risk_profiles' show action. Because i have
> upload some API process is there. currently i have used the below codes but
> it not performed
?? The "below codes" don't match what you're saying you want to do.
> def create
> @risk_profile = RiskProfile.new(risk_profile_params)
>
> if @risk_profile.save
> redirect_to api_risk_profiles_url(:id => @risk_profile)
> end
> end
but the result below looks like it matches the redirect code above
So which is correct, the code or your description?
--
Hassan Schroeder ------------------------
hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote