Ruby On Rails 3.0 officially released faster, stronger, and more beautiful

Source: Internet
Author: User
Tags ruby on rails

It took nearly two years. After multiple test versions, Ruby On Rails 3.0 was officially released. Over 1600 developers participated in the development. With the joint efforts of everyone, Ruby On Rails 3.0 was "faster, stronger, and more beautiful". I believe the new version will not disappoint you.

The Ruby On Rails 3.0 official version has changed a lot, so it is very difficult to pick out outstanding features. Here we will introduce some major changes in the new version.

 
Ruby on Rails Architecture

For more information about Rails, visit: Ruby On Rails development tutorial.

New activity record Query Engine

 
 
  1. Code example:
  2. Users = User. where (: name => "david"). limit (20)
  3. Users. where ("age> 29 ")
  4.  
  5. # SELECT * FROM users
  6. # WHERE name = "david" AND age> 29
  7. # Order by name
  8. # LIMIT 20
  9. Users. order (: name). each {| user | puts user. name}

New Action Mailer component

 
 
  1. Code example:
  2. Class Notifier <ActionMailer: Base
  3. Default: from =>
  4. "Highrise "
  5.  
  6. Def new_project (digest, project, person)
  7. @ Digest, @ project, @ person = digest, project, person
  8.  
  9. Attachments0000'digestance'] = digest. to_pdf
  10. Attachmentspolic'logo.jpg '] = File. read (project. logo_path)
  11.  
  12. Mail (
  13. : Subject => "Your digest for # {project. name }",
  14. : To => person. email_address_with_name
  15. ) Do | format |
  16. Format. text {render: text => "Something texty "}
  17. Format.html {render: text => "SomethingTexty"}
  18. End
  19. End
  20. End

XSS protection is enabled by default.

Question about farewell to character encoding

Internal Reconstruction

Comprehensive documentation

◆ Support for MySQL2 gem

◆ Fixed the automatic loading problem.

Installation Method: gem install rails -- version 3.0.0.

Download Ruby On Rails 3.0: http://rubyonrails.org/download

Reading

Ruby on Rails is based on the MVC Model-View-Controller) design mode. From Ajax applications in the view, access requests and feedback in the Controller, to database encapsulation models, Rails provides you with a pure Ruby development environment. When publishing a website, you only need a database and a network server.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.