Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Whats the difference between symbol and string?

Answer Posted / surekha matte

Rails makes extensive use of symbols. A symbol looks like a
variable symbols name, but it’s prefixed with a colon.
Examples of symbols include :action,:line_items, and :id.

Rails uses symbols to identify things. In particular, it
uses them as keys when naming method parameters and looking
things up in hashes. For example:
redirect_to :action => "edit", :id => params[:id]

Is This Answer Correct ?    17 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how can you declare a block in Ruby?

943


How are string and symbol different?

894


Am Fresher ..,i dont know seven controller methods.am searching in google .but am not getting .help me

2239


what is the use of super function in ruby on rails?

918


What is the use of the super function in ruby on rails?

842


what is the naming convention in Rails?

957


Explain me the log that has to be seen to report errors in ruby rails?

737


Explain me what is the purpose of rjs in rails?

861


How can you protect filter methods in rails?

852


what is the role of Rails Controller?

901


what is the purpose of RJs in Rails?

934


Explain rvm in rails?

780


What is the Install rail package?

1031


Explain view in rails?

817


Do you know what is sweeper in rails?

815