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

Tell me what is ruby on rails?

743


Explain me what is the role of rails controller?

805


What is bundler?

790


What is the difference between Render vs. Redirect_to in ruby on rails ?

821


What is the difference between false and nil in ruby?

801


How is direct different from render?

844


Please explain what are the positive aspects of rails?

786


what are benefits of using active record as opposed to raw sql queries?

873


Explain Get and post method?

871


Explain the controller in rails?

862


What is unit testing (in classical terms)? What is the primary technique when writing a test ?

841


How do rails implement ajax?

840


What does ruby name refer to?

896


Explain how does rails implement ajax?

898


What are the different types of association relationships that exist?

860