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...


What are the differences betweeen Rails 2.x and Rails 3

Answers were Sorted based on User's Feedback



What are the differences betweeen Rails 2.x and Rails 3..

Answer / dayanthan

(1) Introduction of bundler (New way to manage your gem
dependencies)
* (2) Gemfile and Gemfile.lock (Where all your gem
dependencies lies, instead of environment.rb)
* (3) A new .rb file in config/ folder, named as
application.rb (Which has everything that previously
environment.rb had)
* (4) Change in SQL Structure: Model.where(:activated => true)
* (5) All the mailer script will now be in app/mailers
folder, earlier we kept inside app/models.
* (6) Rails3-UJS support. for links and forms to work as
AJAX, instead of writing complex lines of code, we write
:remote => true
* (7) HTML 5 support.
* (8) Changes in the model based validation syntax:
validates :name, :presence => true
* (9) Ability to install
windows/ruby/jruby/development/production specific gems to
Gemfile.
group :production do
gem 'will_paginate'
end

Is This Answer Correct ?    22 Yes 2 No

What are the differences betweeen Rails 2.x and Rails 3..

Answer / biswaranjan

some functionality changers..
ex- in rail2.x
<%= link_to_remote ‘Show’, :url => post %>

ex in rail3.x
<%= link_to ‘Show’, post, :remote => true %>


etc..

Is This Answer Correct ?    21 Yes 3 No

What are the differences betweeen Rails 2.x and Rails 3..

Answer / padmavathy

The main differnce is code simplicity... In rails2 we should write the routes using map and each... In rails3 we dont need to write map and all.
For example:
Rails 2:
map.resoucers :users do |user|
user.resource :profile
end

Rails 3:
resources :users do
resource :profile
end
Like wise in active record also have some differences in rails 2 using find(:all) instead in rails 3 we use where etc..

Then terminal you have to write script for cmd instead rails 3 using rails cmd...
Rails 2:
<%=link_to_remote "login", post, :method=>:delete%>

Rails 3:
<%=link_to "login",new_post_path%>
i have noticed some points only have some more differences... Refer it... Those are all main things...

Is This Answer Correct ?    6 Yes 1 No

What are the differences betweeen Rails 2.x and Rails 3..

Answer / kuna

some functionality difference ...

Is This Answer Correct ?    6 Yes 18 No

Post New Answer

More Ruby on Rails Interview Questions

what is the defined operator?

0 Answers  


Mention the types of variables available in Ruby Class?

0 Answers  


Do you know what are the types of caching used in rails, what are they?

0 Answers  


What are gemsets in rails?

0 Answers  


What is the latest version of ruby on rails?

0 Answers  


how you can list all routes for an application?

0 Answers  


Tell me what is the difference between the observers and callbacks in ruby on rails?

0 Answers  


Explain testing in rails.

0 Answers  


How would you create a controller for the subject?

0 Answers  


Explain rvm in rails?

0 Answers  


What is the purpose of load in ruby?

0 Answers  


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

0 Answers  


Categories