Ramaze a/r helpers

17 views
Skip to first unread message

Jeff Nixon

unread,
Apr 27, 2012, 3:36:06 PM4/27/12
to ram...@googlegroups.com
What is the difference between a Controller.a method like  #{UsersController.a('Remove', :remove_target, tgt.id)} and a Controller.r method? I'm pretty new to Ramaze and i'm just wondering when the best time to use each of them is.

Thanks!

Yorick Peterse

unread,
Apr 27, 2012, 3:52:02 PM4/27/12
to ram...@googlegroups.com
Jeff,

The method a() is used to create an anchor tag, r() merely returns a URL
object. Some examples:

Posts.a('Posts overview', :index)
# => '<a href="/posts">Posts overview</a>'

Posts.r(:index).to_s # => /posts/index

Yorick
> --
> You received this message because you are subscribed to the Google
> Groups "Ramaze" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/ramaze/-/pMk68T6EvWIJ.
> To post to this group, send email to ram...@googlegroups.com.
> To unsubscribe from this group, send email to
> ramaze+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/ramaze?hl=en.

signature.asc
Reply all
Reply to author
Forward
0 new messages