Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

« Newer Snippets
Older Snippets »
2 total  XML / RSS feed 

request hash

Request: #"dispatch", "controller"=>"mephisto", "path"=>["2006", "12", "23", "just-wanna-see"]}, @request_parameters={"action"=>"dispatch", "controller"=>"mephisto", "path"=>["2006", "12", "23", "just-wanna-see"]}, @session_options=false, @session={}, @env={"SERVER_NAME"=>"localhost", "PATH_INFO"=>"/2006/12/23/just-wanna-see", "HTTP_ACCEPT_ENCODING"=>"gzip,deflate", "HTTP_USER_AGENT"=>"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1", "SCRIPT_NAME"=>"/", "SERVER_PROTOCOL"=>"HTTP/1.1", "HTTP_ACCEPT_LANGUAGE"=>"en-us,en;q=0.5", "HTTP_HOST"=>"localhost:3000", "REMOTE_ADDR"=>"127.0.0.1", "SERVER_SOFTWARE"=>"Mongrel 0.3.13.3", "HTTP_KEEP_ALIVE"=>"300", "HTTP_REFERER"=>"http://localhost:3000/", "HTTP_ACCEPT_CHARSET"=>"ISO-8859-1,utf-8;q=0.7,*;q=0.7", "HTTP_VERSION"=>"HTTP/1.1", "REQUEST_URI"=>"/2006/12/23/just-wanna-see", "SERVER_PORT"=>"3000", "GATEWAY_INTERFACE"=>"CGI/1.2", "HTTP_ACCEPT"=>"text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5", "HTTP_CONNECTION"=>"keep-alive", "REQUEST_METHOD"=>"GET"}, @content_type=nil, @cgi=#, @request=#, @params={"SERVER_NAME"=>"localhost", "PATH_INFO"=>"/2006/12/23/just-wanna-see", "HTTP_ACCEPT_ENCODING"=>"gzip,deflate", "HTTP_USER_AGENT"=>"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1", "SCRIPT_NAME"=>"/", "SERVER_PROTOCOL"=>"HTTP/1.1", "HTTP_ACCEPT_LANGUAGE"=>"en-us,en;q=0.5", "HTTP_HOST"=>"localhost:3000", "REMOTE_ADDR"=>"127.0.0.1", "SERVER_SOFTWARE"=>"Mongrel 0.3.13.3", "HTTP_KEEP_ALIVE"=>"300", "HTTP_REFERER"=>"http://localhost:3000/", "HTTP_ACCEPT_CHARSET"=>"ISO-8859-1,utf-8;q=0.7,*;q=0.7", "HTTP_VERSION"=>"HTTP/1.1", "REQUEST_URI"=>"/2006/12/23/just-wanna-see", "SERVER_PORT"=>"3000", "GATEWAY_INTERFACE"=>"CGI/1.2", "HTTP_ACCEPT"=>"text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5", "HTTP_CONNECTION"=>"keep-alive", "REQUEST_METHOD"=>"GET"}, @socket=#>, @params={}, @multipart=false, @output_hidden=nil, @head={}, @handler=#, @host="0.0.0.0", @death_time=60, @classifier={"/"=>[#, @header_only=false, @options={:includes=>["mongrel"], :timeout=>0, :pid_file=>"log/mongrel.pid", :config_script=>nil, :environment=>"development", :host=>"0.0.0.0", :num_processors=>1024, :group=>nil, :docroot=>"public", :port=>3000, :user=>nil, :mime_map=>nil, :cwd=>"C:/Projects/blog.transphorm.com", :daemon=>false, :debug=>false, :log_file=>"log/mongrel.log"}>, #]}, @port=3000, @acceptor=#, @num_processors=1024, @timeout=0, @socket=#>, @guard=#, @files=#>, @args=nil, @output_cookies=nil, @response=#>, @body=#, @status_sent=false, @status=404, @header_sent=false, @body_sent=false, @socket=#>, @cookies={}>, @symbolized_path_parameters=nil, @request_method=:get, @query_parameters={}, @parameters={"action"=>"dispatch", "controller"=>"mephisto", "path"=>["2006", "12", "23", "just-wanna-see"]}>

Фильтр на обновление только разрешенных полей

%w(name email address).each { |f| @person[f] = params[:person][f] }
« Newer Snippets
Older Snippets »
2 total  XML / RSS feed