Rails Route - specific URL -


i want implement tracking pixel inside email.

the tracking pixel url should this:

http://example.com/__track.gif?id=xxxxxxx&u=xxxxx 

questions:

  1. how create route that?
  2. while says it's .gif, don't want gif file, want rails controller called , able run few methods when called, using url params.

thoughts?

put following in routes.rb file:

match "/_track.gif" => "controller_name#action_name" 

replacing controller_name & action_name appropriate.

i recommend read on rails guide routing, match noted in first section.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -