Is there a way I can have only action without view
<p>In my view, there is a <code>link_to</code> to a named route like <code>random_path</code>. So when the user clicks on that link, it will go to a particular controller with an action, in which I am writing to a DB. It really does not need to render the view. <strong>But having the view template seems to be mandatory</strong>. <code>Is there a way to avoid having the view.</code></p>

<pre><code>&lt;%= link_to bla_path do %&gt;

&lt;% end %&gt;
</code></pre>

<p>in routes.rb </p>

<pre><code>get 'bla' =&gt; 'contr#act'
</code></pre>

<p>In controller </p>

<pre><code>in cont_controller.rb

def act 

Model.create(name: "bla")

# I don't need the view for this. 

end 
</code></pre>