link_to_unless_current love

link_to_unless_current

Definitions

Sorry, no definitions found. Check out and contribute to the discussion of this word!

Etymologies

Sorry, no etymologies found.

Support

Help support Wordnik (and make this page ad-free) by adopting the word link_to_unless_current.

Examples

  • We'll use the index page of the Site controller, checking to make sure that the register and login links are both present, and that there is no link for "Home" (since link_to_unless_current should suppress any links to the current page).

    Recently Uploaded Slideshows midpoint 2009

  • We'll put our navigation link function there: Listing 4.25 app/helpers/application helper. rb module ApplicationHelper # Return a link for use in layout navigation. def nav_link (text, controller, action = "index") return link_to_unless_current text,: controller = > controller,: action = > action end end 15 The application helper is a module, which is a collection of functions designed to be mixed in to a class.

    Recently Uploaded Slideshows midpoint 2009

Comments

Log in or sign up to get involved in the conversation. It's quick and easy.