All Projects → rails → Rails

rails / Rails

Licence: mit
Ruby on Rails

Programming Languages

ruby
36898 projects - #4 most used programming language
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects
coffeescript
4710 projects
shell
77523 projects

Projects that are alternatives of or similar to Rails

Kales
Kotlin on Rails
Stars: ✭ 78 (-99.84%)
Mutual labels:  framework, mvc
Mini
Just an extremely simple naked PHP application, useful for small projects and quick prototypes. Some might call it a micro framework :)
Stars: ✭ 1,308 (-97.37%)
Mutual labels:  framework, mvc
Pluck all
A more efficient way to get data from database. Like #pluck method but return array of hashes instead.
Stars: ✭ 83 (-99.83%)
Mutual labels:  activerecord, rails
Ouzo
Ouzo Framework - PHP MVC ORM
Stars: ✭ 66 (-99.87%)
Mutual labels:  framework, mvc
Active record replica
Redirect ActiveRecord (Rails) reads to replica databases while ensuring all writes go to the primary database.
Stars: ✭ 96 (-99.81%)
Mutual labels:  activerecord, rails
Spreadsheet architect
Spreadsheet Architect is a library that allows you to create XLSX, ODS, or CSV spreadsheets super easily from ActiveRecord relations, plain Ruby objects, or tabular data.
Stars: ✭ 1,160 (-97.67%)
Mutual labels:  activerecord, rails
Gracejs
A Nodejs BFF framework, build with koa2(基于koa2的标准前后端分离框架)
Stars: ✭ 1,302 (-97.38%)
Mutual labels:  framework, mvc
Fresh connection
FreshConnection provides access to one or more configured database replicas.
Stars: ✭ 56 (-99.89%)
Mutual labels:  activerecord, rails
Validates timeliness
Date and time validation plugin for ActiveModel and Rails. Supports multiple ORMs and allows custom date/time formats.
Stars: ✭ 1,319 (-97.35%)
Mutual labels:  activerecord, rails
Appier
Joyful Python Web App development
Stars: ✭ 92 (-99.81%)
Mutual labels:  framework, mvc
Php Mini Framework
PHP mini framework
Stars: ✭ 65 (-99.87%)
Mutual labels:  framework, mvc
Activerecord Clean Db Structure
Automatic cleanup for the Rails db/structure.sql file (ActiveRecord/PostgreSQL)
Stars: ✭ 101 (-99.8%)
Mutual labels:  activerecord, rails
Flexicms
Flexible site management system Flexi CMS
Stars: ✭ 61 (-99.88%)
Mutual labels:  framework, mvc
Acts as hashids
Use Youtube-Like ID in ActiveRecord seamlessly.
Stars: ✭ 76 (-99.85%)
Mutual labels:  activerecord, rails
Mixed gauge
A simple and robust database sharding with ActiveRecord.
Stars: ✭ 58 (-99.88%)
Mutual labels:  activerecord, rails
Rails or
Cleaner syntax for writing OR Query in Rails 5, 6. And also add #or support to Rails 3 and 4.
Stars: ✭ 86 (-99.83%)
Mutual labels:  activerecord, rails
Bast
Simple but Elegant Web Framework
Stars: ✭ 49 (-99.9%)
Mutual labels:  framework, mvc
Logidze
Database changes log for Rails
Stars: ✭ 1,060 (-97.87%)
Mutual labels:  activerecord, rails
Smart sms
The easiest way to integrate SMS service in China
Stars: ✭ 92 (-99.81%)
Mutual labels:  activerecord, rails
Graphql devise
GraphQL interface on top devise_token_auth
Stars: ✭ 100 (-99.8%)
Mutual labels:  activerecord, rails

Welcome to Rails

What's 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::Base. Active Record allows 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.

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.

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.

Frameworks and libraries

Active Record, Active Model, Action Pack, and Action View can each be used independently outside Rails. In addition to that, Rails also comes with Action Mailer, a library to generate and send emails; Action Mailbox, a library to receive emails within a Rails application; Active Job, a framework for declaring jobs and making them run on a variety of queuing backends; Action Cable, a framework to integrate WebSockets with a Rails application; Active Storage, a library to attach cloud and local files to Rails applications; Action Text, a library to handle rich text content; and Active Support, a collection of utility classes and standard library extensions that are useful for Rails, and may also be used independently outside Rails.

Getting Started

  1. Install Rails at the command prompt if you haven't yet:

     $ gem install rails
    
  2. At the command prompt, create a new Rails application:

     $ rails new myapp
    

    where "myapp" is the application name.

  3. Change directory to myapp and start the web server:

     $ cd myapp
     $ bin/rails server
    

    Run with --help or -h for options.

  4. Go to http://localhost:3000 and you'll see: "Yay! You’re on Rails!"

  5. Follow the guidelines to start developing your application. You may find the following resources handy:

Contributing

We encourage you to contribute to Ruby on Rails! Please check out the Contributing to Ruby on Rails guide for guidelines about how to proceed. Join us!

Trying to report a possible security vulnerability in Rails? Please check out our security policy for guidelines about how to proceed.

Everyone interacting in Rails and its sub-projects' codebases, issue trackers, chat rooms, and mailing lists is expected to follow the Rails code of conduct.

License

Ruby on Rails is released under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].