The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Using named routes in Streamlined addition files

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Matthew Bass

Posts: 468
Nickname: pelargir
Registered: Dec, 2005

Jared Richardson and Matthew Bass are independent software consultants
Using named routes in Streamlined addition files Posted: Feb 4, 2008 12:44 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Matthew Bass.
Original Post: Using named routes in Streamlined addition files
Feed Title: Pelargir
Feed URL: http://feeds.feedburner.com/pelargir/
Feed Description: Musings on software and life from Matthew Bass. Regular posts on new web products, tips and tricks, etc.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Matthew Bass
Latest Posts From Pelargir

Advertisement
For you Streamlined users out there, here’s an easy way to include named routes in your Streamlined addition modules. Previously, you had to hard code the URLs like so: module OrderAdditions   def name_link     link_to user.name, "/users/show/#{user.id}"   end end   Order.class_eval do   include OrderAdditions   include ActionView::Helpers::UrlHelper   include ActionView::Helpers::TagHelper end   Streamlined.ui_for(Order) do   list_columns :name_link end By including Rails 2’s new ActionController::UrlWriter module, you can access any named or RESTful routes you’ve defined [...]

Read: Using named routes in Streamlined addition files

Topic: Useful Blogs I: Web Development and Design Previous Topic   Next Topic Topic: Antlr 3 and the Dynamic Language Runtime

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use