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 is the model view controller framework used in ruby on rails?

857


Explain the role of sub directory app/controllers and app/helpers.

865


how you can list all routes for an application?

885


what is the purpose of RJs in Rails?

945


what is a rails migration? Write up a short example of a simple rails migration with a table called customers, a string column called name, and a text column called description?

838


what is Mixin in Rails?

894


what is Cross-Site Request Forgery (CSRF) and how Rails is protected against it?

971


What is a ruby singleton method ?

856


Explain coc in rails?

948


What is the difference between concern and application_controller.rb in ruby on rails?

828


Is ruby on rails dying?

868


what is rake in Rails?

886


Choosing between belongs_to and has_one?

886


What are the different types of association relationships that exist?

928


what is active record?

903