f00860
f00860

Reputation: 3576

Links in Ramaze with a/r helpers

In ramaze (2009.06.04) the link helper has changed and I have some problems to use it. I want to create a link to the MainController -> test action

#{a('Testlink', r(:test))}

This works if the URL is not in a specific controller. If the user is in a other controller like http://site/othercontroller/testtwo, the Testlink are linked to http://site/othercontroller/test.

How can I set the link constant to http://site/test ?

Upvotes: 0

Views: 338

Answers (2)

hrnt
hrnt

Reputation: 10142

Try #{a('Testlink', MainController.r(:test))}

Upvotes: 1

bougyman
bougyman

Reputation: 36

Use the Controller.a method, like #{UsersController.a('Remove', :remove_target, tgt.id)}

Upvotes: 2

Related Questions