Re:Ask HN: Is Ruby on Rails really worth knowing?
by bricestacey on Tuesday February 08, 2011 @02:46PM
(#2194481)
Rails has GET variables, but the "rails way" is "restful routes" whenever possible. So something like /posts/12 will automatically pass 12 as a specific GET variable e.g. params[:id]. Or /posts/12/comments/4 might pass the parameters :id (12) and :comment_id (4).
This happens all the time for people using PHP too, however it's usually accomplished via mod_rewrite. For example, Drupal's pretty URLs simply rewrite /posts/12/comments/4 to /index.php?q=posts/12/comments/4.
This happens all the time for people using PHP too, however it's usually accomplished via mod_rewrite. For example, Drupal's pretty URLs simply rewrite /posts/12/comments/4 to /index.php?q=posts/12/comments/4.