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
Ruby: "Gem Install Bundler" Not Installing Bundler
How to Compile and Statically Link Ruby Libs for Docker
Putting French (Accented) Characters in Ruby File
Rufus Scheduler Not Running in Production
Libmysqlclient.So.15: Cannot Open Shared Object File: No Such File or Directory
How to Update Ruby on Linux (Ubuntu)
Using Rvm on Ubuntu 12.04 to Use Rails. the Program 'Rails' Is Currently Not Installed
Gemfile.Lock Write Error, Permissions
Recommended Development Web Server for Ruby on Rails 3
Setting Up Rake-Pipeline for Use with Handlebars Alongside Google App Engine
Rails - Render :Action to Target Anchor Tag
The <<- Operator on Ruby, Where Is It Documented
Rails Assets:Precompile Yarn Executable Was Not Detected in the System
How to Match Accented Characters With a Regex
How to Call a Controller'S Method from a View (As We Call from Helper Ideally)