Why doesn't default_url_options :anchor => ... work for rend

In my action, I test to see if a particular button was clicked, if it
was, I want the template to render, but to go to a particular anchor,
like #company.

if params[‘add_company’]
default_url_options :anchor => ‘insurance’
#… logic

then default render

In the add.rhtml:

<%= text_field model, company_name %>

But this doesn’t work. Nor does there seem to be a way to pass an
:anchor to the render method.

Does anyone know a way to do this?


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs