ルーターを触ってみる
URLルーティングは
/config/routes.rb に定義されている
get 'users/show/:username' => "users#show"
と書いて、http://localhost:3000/users/show/hoge にアクセスすると、"users#show"の定義で
usersコントローラのshowメソッドにフォワードされ、 params[:username] というhashでhogeが受け取れる
class UsersController < ApplicationController def show @user = Hash.new @user[:name] = params[:username] end end