Rails is a web-application framework that includes everything needed to
create database-backed web applications according to the
Understanding the MVC pattern is key to understanding Rails. MVC divides your application into three layers, each with a specific responsibility.
The Model layer represents your domain model (such as Account, Product, Person, Post, etc.) and encapsulates the business logic that is specific to your application. In Rails, database-backed model classes are derived from ActiveRecord::Base. Active Record allows you to present the data from database rows as objects and embellish these data objects with business logic methods. You can read more about Active Record in its README. 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. You can read more about Active Model in its README.
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. You can read more about Action Pack in its README.
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. You can read more about Action View in its README.
Ruby on Rails alternatives and related gems
Based on the "Web Frameworks" category
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of Ruby on Rails or a related project?
Ruby on Rails RecommendationsThere are no recommendations yet. Be the first to promote Ruby on Rails!
Have you used Ruby on Rails? Share your experience. Write a short recommendation and Ruby on Rails, you and your project will be promoted on Awesome Ruby.
Recommend Ruby on Rails
Recently added Ruby on Rails resources
Write simple HTML polling using Ruby on Rails ONLY.Article Added by nikolalsvk // medium.com // 8 days ago
In this tutorial you'll learn every possible way to write a loop expression in Ruby. This is key for any Ruby developer to understand & write good code.Tutorial Added by jesus_castello // www.rubyguides.com // 11 days ago
Using StimulusJS controllers, adding nested forms to a Rails application is easy and unobtrusive. In this episode, we look at an alternative way of creating nested forms without the Cocoon gem.Tutorial Added by kobaltz // www.driftingruby.com // 16 days ago
Tutorial Added by ShivangiCometChat // www.cometchat.com // 16 days ago
I’ve built a Slack bot in Ruby on Rails and it is profitable. In this blog post I will describe what I did and tools I used to create, promote and monetize a simple SAAS product.
Article Added by pawurb // abot.app // 16 days ago
The release of the newest version of Ruby on Rails is just around the corner. With it, a ton of new features will be introduced to the public. We’re excited to see all the new stuff Ruby on Rails 6.0 has to offer! With regular releases of the beta versions, developers had access to the upcoming framework for quite a while and they reported that it looks solid. Will the new Ruby on Rails 6.0 bring back the enormous popularity RoR once had?Article Added by suleiro // naturaily.com // 26 days ago
A story of developing a Rails app with the assistance of Phoenix app delegated to performing custom tasks. See how the romance between Rails and Phoenix ended with building a highly performant online ticketing marketplace app.Tutorial Added by JoannaStaromiejska // bit.ly // about 2 months ago
Ruby on Rails is almost 15 years old but it’s nowhere close to passing on from the world of programming. While no longer among the most popular, Ruby on Rails is still widely used in 2019, offering maturity, stability, and high code quality. Let's see what else makes this a good choice for your app.Article Added by JoannaStaromiejska // hi.monterail.co // 2 months ago