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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how can we define Ruby regular expressions?

485


How are the key differences between python and ruby?

473


Explain some features of nested scaffolding.

483


What is action cable?

505


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

450






Explain rest in rails routes.

491


Is ruby on rails popular?

500


How you run your Rails Application without creating database ?

456


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

527


What is the purpose of load in ruby?

482


what is testing in rails?

536


Explain about restful architecture?

462


Explain me what is the difference between concern and application_controller.rb in ruby on rails?

445


what are the positive aspects of Rails?

457


what is the defined operator?

605