# Hide\_action doesnot hide view

**URL:** <https://www.ruby-forum.com/t/hide-action-doesnot-hide-view/52455>\
**Category:** Rails\
**Created:** [January 14, 2006, 11:04am UTC](https://www.ruby-forum.com/t/hide-action-doesnot-hide-view/52455 "2006-01-14T11:04:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cujigar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/2acd7d/32.png) [@cujigar](https://www.ruby-forum.com/u/cujigar)\
**Post date:** [January 14, 2006, 11:04am UTC](https://www.ruby-forum.com/t/hide-action-doesnot-hide-view/52455/1 "2006-01-14T11:04:12Z")

</div>

The view file (eg. apps/views/items/list.rhrml) is still displayed even  
when the action is hidden (hide\_action :list). How can I hide view file  
form being automatically displayed in this circumstance?

thanks,  
jigar

---

<div class="post-metadata">

**Author:** ![cujigar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/2acd7d/32.png) [@cujigar](https://www.ruby-forum.com/u/cujigar)\
**Post date:** [January 15, 2006, 10:38am UTC](https://www.ruby-forum.com/t/hide-action-doesnot-hide-view/52455/2 "2006-01-15T10:38:18Z")

</div>

Jigar G. wrote:

> The view file (eg. apps/views/items/list.rhrml) is still displayed even  
> when the action is hidden (hide\_action :list). How can I hide view file  
> form being automatically displayed in this circumstance?
> 
> thanks,  
> jigar

Delete the view file. This assumes, of course, that you don’t need it  
anymore. Otherwise, why would you want to hide the action?

– stefan

–  
For rails performance tuning, see: [http://railsexpress.de/blog](http://railsexpress.de/blog)  
Subscription: [railsexpress.de](http://railsexpress.de/blog/xml/rss20/feed.xml)

---

<div class="post-metadata">

**Author:** ![cujigar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/2acd7d/32.png) [@cujigar](https://www.ruby-forum.com/u/cujigar)\
**Post date:** [January 17, 2006, 1:00am UTC](https://www.ruby-forum.com/t/hide-action-doesnot-hide-view/52455/3 "2006-01-17T01:00:28Z")

</div>

rename it?

It is under version control, right? Go ahead and delete it, then  
restore  
when you need it again.

matt

---

<div class="post-metadata">

**Author:** ![cujigar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/2acd7d/32.png) [@cujigar](https://www.ruby-forum.com/u/cujigar)\
**Post date:** [January 16, 2006, 7:59am UTC](https://www.ruby-forum.com/t/hide-action-doesnot-hide-view/52455/4 "2006-01-16T07:59:33Z")

</div>

> > 
> 
> Delete the view file. This assumes, of course, that you don’t need it  
> anymore. Otherwise, why would you want to hide the action?

i cant delete it, cause it will be required in future(in abt 15 days). i  
just wanted to disable signup for my application for some time.

So, can i assiume there is no way, yet, in rails to completely disable  
action and view?

> – stefan
> 
> –  
> For rails performance tuning, see: [http://railsexpress.de/blog](http://railsexpress.de/blog)  
> Subscription: [railsexpress.de](http://railsexpress.de/blog/xml/rss20/feed.xml)

---

<div class="post-metadata">

**Author:** ![cujigar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/2acd7d/32.png) [@cujigar](https://www.ruby-forum.com/u/cujigar)\
**Post date:** [January 17, 2006, 1:37am UTC](https://www.ruby-forum.com/t/hide-action-doesnot-hide-view/52455/5 "2006-01-17T01:37:34Z")

</div>

matthew clark wrote:

> rename it?
> 
> It is under version control, right?

not really ;), not right now, but i can put it under vcs.

> Go ahead and delete it, then  
> restore  
> when you need it again.
> 
> matt

and for restoring, i’ll have to remember all the filenames and their  
version nos (or a tag will do) and merge the changes when ever i require  
tham back.

you’ll have to agree, that it is more painful than having something like  
“hide\_view” in code.

thanks for the reply, i’ll probably will delete view code and use  
“hide\_action” in my controller.

jigar.
