Rails 6.0.0.beta1 releases: web-application framework

rails

Rails is a web-application framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern.

Understanding the MVC pattern is key to understanding Rails. MVC divides your application into three layers: Model, View, and Controller, each with a specific responsibility.

Model layer

The Model layer represents the domain model (such as Account, Product, Person, Post, etc.) and encapsulates the business logic specific to your application. In Rails, database-backed model classes are derived from ActiveRecord::BaseActive Recordallows you to present the data from database rows as objects and embellish these data objects with business logic methods. Although most Rails models are backed by a database, models can also be ordinary Ruby classes, or Ruby classes that implement a set of interfaces as provided by the Active Model module.

Controller layer

The Controller layer is responsible for handling incoming HTTP requests and providing a suitable response. Usually this means returning HTML, but Rails controllers can also generate XML, JSON, PDFs, mobile-specific views, and more. Controllers load and manipulate models, and render view templates in order to generate the appropriate HTTP response. In Rails, incoming requests are routed by Action Dispatch to an appropriate controller, and controller classes are derived from ActionController::Base. Action Dispatch and Action Controller are bundled together in Action Pack.

View layer

The View layer is composed of “templates” that are responsible for providing appropriate representations of your application’s resources. Templates can come in a variety of formats, but most view templates are HTML with embedded Ruby code (ERB files). Views are typically rendered to generate a controller response, or to generate the body of an email. In Rails, View generation is handled by Action View.

rails

Rails 6.0.0.beta1 was released.

Changelog

Active Support

  • Remove deprecated Module#reachable? method.

    Rafael Mendonça França

  • Remove deprecated #acronym_regex method from Inflections.

    Rafael Mendonça França

  • Fix String#safe_constantize throwing a LoadError for incorrectly cased constant references.

    Keenan Brock

  • Preserve key order passed to ActiveSupport::CacheStore#fetch_multi.

    fetch_multi(*names) now returns its results in the same order as the *names requested, rather than returning cache hits followed by cache misses.

    Gannon McGibbon

  • If the same block is included multiple times for a Concern, an exception is no longer raised.

    Mark J. TitorenkoVlad Bokov

More

Download