# How to stop action in controller trying to render something?

**URL:** <https://www.ruby-forum.com/t/how-to-stop-action-in-controller-trying-to-render-something/83014>\
**Category:** Rails\
**Created:** [January 23, 2007, 12:47am UTC](https://www.ruby-forum.com/t/how-to-stop-action-in-controller-trying-to-render-something/83014 "2007-01-23T00:47:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [January 23, 2007, 12:47am UTC](https://www.ruby-forum.com/t/how-to-stop-action-in-controller-trying-to-render-something/83014/1 "2007-01-23T00:47:20Z")

</div>

Hi,

I have a B2B type action in a controller for which an external system  
hits  
my site to provide updates.

Quesion - How do I stop my action in my controller trying to perform a  
render, i.e. to keep my logs clean. At the moment it trys to render but  
of  
course there is no page to render.

Tks

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [January 23, 2007, 12:56am UTC](https://www.ruby-forum.com/t/how-to-stop-action-in-controller-trying-to-render-something/83014/2 "2007-01-23T00:56:22Z")

</div>

Have you tried

render :nothing =\> true, :layout =\> false

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [January 23, 2007, 7:18am UTC](https://www.ruby-forum.com/t/how-to-stop-action-in-controller-trying-to-render-something/83014/3 "2007-01-23T07:18:59Z")

</div>

You can always return false, but I think Chris’ way is the official  
Rails 1.2 way of doing this.

def my\_method  
…  
return false  
end

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [January 23, 2007, 9:45pm UTC](https://www.ruby-forum.com/t/how-to-stop-action-in-controller-trying-to-render-something/83014/4 "2007-01-23T21:45:20Z")

</div>

thanks guys - Bart this seemed to work fine on rails 1.1.6
