ClearMyBench
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Ruby concepts part 2 (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Ruby concepts part 2
#4678
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby concepts part 2 3 Years, 10 Months ago Karma: 0  
Ruby comes with a special library called cgi that enables more sophisticated interactions than those with the preceding CGI script.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4679
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby concepts part 2 3 Years, 10 Months ago Karma: 0  
Using class CGI gives we can get access to HTML query parameters in two ways.

Suppose we are given a URL ,we can access the parameters FirstName and LastName using CGI#sing class CGI gives we can get access to HTML query parameters in two ways.

Suppose we are given a URL ,we can access the parameters FirstName and LastName using CGI#[] directly .
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4680
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby concepts part 2 3 Years, 10 Months ago Karma: 0  
If a form contains multiple fields with the same name, the corresponding values will be returned to the script as an array.


The f a form contains multiple fields with the same name, the corresponding values will be returned to the script as an array.


The [] accessor returns just the first of these.index the result of the params method to get them all.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4681
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby concepts part 2 3 Years, 10 Months ago Karma: 0  
Ruby will take care of GET and POST methods automatically. There is no separate treament for these two different methods
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4682
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby concepts part 2 3 Years, 10 Months ago Karma: 0  
CGI contains a huge number of methods used to create HTML.

We will find one method per tag. In order to enable these methods, we must create a CGI object by calling CGI.new
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4683
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby concepts part 2 3 Years, 10 Months ago Karma: 0  
To make tag nesting easier, these methods take their content as code blocks.

The code blocks should return a String, which will be used as the content for the tag
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
get the latest posts directly to your desktop
logo footer   Copyright 2009 - 2013 HotRecruiter.Com - All Rights Reserved