# Sending info to rails server without a render response

**URL:** <https://discuss.rubyonrails.org/t/sending-info-to-rails-server-without-a-render-response/83478>\
**Category:** rubyonrails-talk\
**Created:** [August 15, 2023, 5:21pm UTC](https://discuss.rubyonrails.org/t/sending-info-to-rails-server-without-a-render-response/83478 "2023-08-15T17:21:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bas317](https://avatars.discourse-cdn.com/v4/letter/b/b487fb/32.png) [@bas317](https://discuss.rubyonrails.org/u/bas317)\
**Post date:** [August 15, 2023, 5:21pm UTC](https://discuss.rubyonrails.org/t/sending-info-to-rails-server-without-a-render-response/83478/1 "2023-08-15T17:21:41Z")

</div>

I have a dropdown menu with checkboxes that reflects settings made by the user. I want to save these settings in the current session.

First I tried a \<%= link\_to … method: :put %\>

I always got a GET request nevertheless although the generated html included `<a href ... data-method="put" ... </a>`. Do I need to create a form submission instead?

Just to test things I routed the request to a GET in config/routes.rb, but then I ran into the 2nd problem, that I was unable to send back “got it, thx, just keep going” to the browser. I saw “render :nothing =\> true” on the internet, but it didn’t work either, rails still said " Template is missing". To everything I tried rails complained that I need to render something in return.

I found people talking about AJAX to accomplish it, but now rails 7 uses the new turbo.

How do I accomplish this or what doc/guide do I need to read to progress? Thanks!

---

<div class="post-metadata">

**Author:** ![walterdavis](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/walterdavis/32/705_2.png) [@walterdavis](https://discuss.rubyonrails.org/u/walterdavis)\
**Post date:** [August 15, 2023, 5:43pm UTC](https://discuss.rubyonrails.org/t/sending-info-to-rails-server-without-a-render-response/83478/2 "2023-08-15T17:43:22Z")

</div>

Try making that a `button_to` with a `turbo_method`. You can also use a `link_to` with a `turbo_method`, but button is more semantic, since it will get an actual form built around it, and not rely on JavaScript to do that at the last moment. One reason to prefer `link_to` and `turbo_method` would be if that element was being added inside another form. You can’t nest forms.

Walter

---

<div class="post-metadata">

**Author:** ![bas317](https://avatars.discourse-cdn.com/v4/letter/b/b487fb/32.png) [@bas317](https://discuss.rubyonrails.org/u/bas317)\
**Post date:** [August 15, 2023, 6:29pm UTC](https://discuss.rubyonrails.org/t/sending-info-to-rails-server-without-a-render-response/83478/3 "2023-08-15T18:29:03Z")

</div>

Works like a charm. Thanks Walter, super helpful! I’ll read a bit about the new turbo framework and try to understand it better.
