# Link\_to :application=\>"app2", :controller=\>.., :action=\>

**URL:** <https://www.ruby-forum.com/t/link-to-application-app2-controller-action/128929>\
**Category:** Rails\
**Created:** [February 12, 2008, 7:42pm UTC](https://www.ruby-forum.com/t/link-to-application-app2-controller-action/128929 "2008-02-12T19:42:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![crenner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/278dde/32.png) [@crenner](https://www.ruby-forum.com/u/crenner)\
**Post date:** [February 12, 2008, 7:42pm UTC](https://www.ruby-forum.com/t/link-to-application-app2-controller-action/128929/1 "2008-02-12T19:42:45Z")

</div>

Wouldn’t this be good?? :

link\_to :application=\>“app2”, :controller=\>“app2controller”,  
:action=\>“action”

or

form\_tag :application=\>“app2”, :controller=\>“app2controller”,  
:action=\>“action” do  
…  
end

I run many rails applications and the ability to link\_to the other apps  
as simply as this would be great.

---

<div class="post-metadata">

**Author:** ![crenner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/278dde/32.png) [@crenner](https://www.ruby-forum.com/u/crenner)\
**Post date:** [February 12, 2008, 8:48pm UTC](https://www.ruby-forum.com/t/link-to-application-app2-controller-action/128929/2 "2008-02-12T20:48:53Z")

</div>

Chris R. wrote:

> Wouldn’t this be good?? :
> 
> link\_to :application=\>“app2”, :controller=\>“app2controller”,  
> :action=\>“action”
> 
> or
> 
> form\_tag :application=\>“app2”, :controller=\>“app2controller”,  
> :action=\>“action” do  
> …  
> end
> 
> I run many rails applications and the ability to link\_to the other apps  
> as simply as this would be great.

as you always have another domain name or sub dir for each rails app you  
should be able to do

\<%= link\_to “link to another rails app”,  
“[http://someting.com/app2controller](http://someting.com/app2controller)”,  
:action=\>“action” %\>

---

<div class="post-metadata">

**Author:** ![crenner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/278dde/32.png) [@crenner](https://www.ruby-forum.com/u/crenner)\
**Post date:** [February 13, 2008, 12:07am UTC](https://www.ruby-forum.com/t/link-to-application-app2-controller-action/128929/3 "2008-02-13T00:07:55Z")

</div>

But, without being able to access the other app’s routes, it wouldn’t  
be able to do anything special and wouldn’t do what you’re normal  
‘link\_to’ links are capable of… then if it could access the other  
app’s routes, what if they conflicted with each other? That’d be a  
bugger to debug & maintain, IMO.

On Feb 12, 6:42 pm, Chris R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![crenner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/278dde/32.png) [@crenner](https://www.ruby-forum.com/u/crenner)\
**Post date:** [February 13, 2008, 3:38am UTC](https://www.ruby-forum.com/t/link-to-application-app2-controller-action/128929/4 "2008-02-13T03:38:18Z")

</div>

idleFingers wrote:

> But, without being able to access the other app’s routes, it wouldn’t  
> be able to do anything special and wouldn’t do what you’re normal  
> ‘link\_to’ links are capable of… then if it could access the other  
> app’s routes, what if they conflicted with each other? That’d be a  
> bugger to debug & maintain, IMO.

well, if you could access the other apps routes, then you would just  
have to make sure you didn’t have conflicting routes. Surely a plugin  
would be able to easily detect conflicts just from comparing routes? and  
if it detected any then just warn the user.

I think this is a great idea.
