# Can I pass parameter in redirect\_to

**URL:** <https://www.ruby-forum.com/t/can-i-pass-parameter-in-redirect-to/171859>\
**Category:** Rails\
**Created:** [July 10, 2009, 10:59am UTC](https://www.ruby-forum.com/t/can-i-pass-parameter-in-redirect-to/171859 "2009-07-10T10:59:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![youhaodeyi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/b9bd4f/32.png) [@youhaodeyi](https://www.ruby-forum.com/u/youhaodeyi)\
**Post date:** [July 10, 2009, 10:59am UTC](https://www.ruby-forum.com/t/can-i-pass-parameter-in-redirect-to/171859/1 "2009-07-10T10:59:23Z")

</div>

I use redirect\_to to another action. Can I pass parameters to this  
action?

---

<div class="post-metadata">

**Author:** ![youhaodeyi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/b9bd4f/32.png) [@youhaodeyi](https://www.ruby-forum.com/u/youhaodeyi)\
**Post date:** [July 10, 2009, 11:12am UTC](https://www.ruby-forum.com/t/can-i-pass-parameter-in-redirect-to/171859/2 "2009-07-10T11:12:21Z")

</div>

Hello,

Yes, you can add parameters in a hash, such as the id for the action.

> **[ActionController::Base](https://api.rubyonrails.org/classes/ActionController/Base.html#M000680)**
>
> Action Controllers are the core of a web request in Rails. They are made up of one or more actions that are executed on request and then either it renders a template or redirects to another action.

Cyril

2009/7/10 Zhao Yi [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
