You are on page 1of 1
RAILS 3 © ROUTING API @n! BASIC ROUTING OPTIONAL PARAMETERS REDIRECTION NAMED ROUTES RACK ROUTING CONSTRAINTS LEGACY ROUTE SCOPE Yourkpp::application.rovtes. draw do NESTED ROUTES | sonespace sap: vo resources posts Tarespace internal do fateh ‘/alt" => "postseindex resources 12ccounts do Foot sto => “honefindes resources orders nenber do ea ost scontien, ron => snenber atch */posts(/:yy(/:nm))* => "poststindex” get spending class PostsControLler < ApplicationControtler Sal ef index qt lacked, son = scottection # poraest:yy] end # parans (am) on end i match 1/sign_out* watch ‘/users/:none' match 7900912" Gives you sign in_path helper atch */reset_password/; token" susers#reset_passwor Jord", :as => "reset_password! a Gives reset_password_path(key’) fort het = prec Linnvl 188, C4, Media Rack Get ‘/rack endpoint’ = Postsontratler-actian( index) Get “/rackcapp" = CustonRackApp match */:yeart => “postseindex", etrbinte =o Ceyenr = NGED/, H4p “S /28A.2604.29.\900, 29/3 constraints(:host = /loealhost/) do ont —_—_ | Responds to selimatches?(request) 'queenbeevaccounts + Commented out by default watch */:controUtert/:action(/4d(.#format)))* i scope ‘token', stoken => /\w(5}/ do + Requires token parameter to get to resources Tesources :foons do and must be 5 alahanumeric characters Tesources sneeings 2 s end [— Locale is optional for these routes scope *(slocate)"y local Fesources pasts Foot !t0 => "postsaindex end fentpy to ——I http://aniruddhatechnical.blogspot.in/

You might also like