Rails - Render :Action to Target Anchor Tag

Rails - render :action to target anchor tag?

Believe I found a solution. For anyone else having this issue, pointing the form like so:

<%= form_tag '/page#form' do %>

Seems to have solved the problem.

How to render a page with instance variable with a hash anchor

redirect_to comment_path(@comment, anchor: "title")

http://blog.betterapps.nl/2012/09/12/30/rails-tip-how-to-add-an-anchor-to-a-redirect_to/

Rails 3: Rendering actions with named anchors/fragments after failed form submission

Best way was to use jquery cookie to save last opened tab and then set default tab using saved cookie.

Select tag with many items takes time to render

I would suggest select2

And best approach would be to not load data immediately, but when user types in 3 letters, then you show the data filtered with those 3 letters. It also gives you nice way to search trough you 17k elements, to faster find result.

How to make Rails render a view and automatically scroll down?

http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html

redirect_to profile_path(@profile, :anchor => "wall")

That is how you pass anchors.

How to render rails partial into a new browser tab

Add option target="_blank" to your form, this will make make your form submitted on new tab and on that tab it will render whatever you defined in create method.

Then write a script to listen to that form onSubmit and then redirect the current page to index.

$('#your-form-id').submit(function() {
window.location.href = "YOUR_INDEX_PAGE";
});


Related Topics



Leave a reply



Submit