Quantcast
Channel: webmaster's diary
Viewing all articles
Browse latest Browse all 14

What are Params in Ruby

$
0
0
Q: What are params in Ruby? A: params in Ruby are equivalent of $_REQUEST array in PHP. They can come from: query string of GET request, input from POST request, or the path of the URL. If user requested http://localhost:4567/bill then params[:name] are “bill” Example: require 'sinatra' get '/:name' do name = params[:name] "Hi there […]

Viewing all articles
Browse latest Browse all 14

Trending Articles