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:
- how create route that?
- 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
Post a Comment