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
What is the flash?
what is the difference between the Observers and Callbacks in Ruby on Rails?
Write the command to run the migration.
What can Rails Migration do?
What do you mean by render and redirect_to?
What do you understand by rails?
Tell me what is orm (object-relationship-model) in rails?
Explain the role of sub directory app/controllers and app/helpers.
What is the latest version of ruby on rails?
what are the positive aspects of Rails?
At is cross-site request forgery (csrf)?
how does ruby on rails use the model view controller (mvc) framework?
what is the purpose of the resources method in the code snippet below?
What is the purpose of auto_load in ruby?
Do you know the role of garbage collection in ruby on rails?