Ruby on Rails Saturday, July 16, 2016

> On Jul 16, 2016, at 3:03 PM, Padmahas Bn <padmahas@gmail.com> wrote:
>
> Hello Walter,
> It was a simple mistake I had done in form that I'm laughing at myself now.
> Instead of giving :onclick => "sendParams('receipt_rpts/create')"
> I should have gave :onclick => "sendParams('/receipt_rpts/create')"
>
> It was just a slash "/" I should have given before the URL. Then the controller name "/reports" won't get prefixed automatically.
>
> And another code :onclick => "sendParams('receipt_rpts_create_path')" is completely wrong as you said, if this type of path has mentioned inside rails then rails would have already converted those helper and hash before page is rendered and JS will access only decoded HTML. So all I have to give is decoded path.
>
> Thank you for your help.

You are welcome, glad you figured it out.

Walter

>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAC_h78L54kVdtXbUFtU_URuaq50oYYhvEO1O9iisPTdDNy672Q%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/56B8446E-EB16-44FA-A22B-0F646AA23C70%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment