Ruby on rails notes for professionals
✍ Scribed by Goalkicker.com
- Tongue
- English
- Leaves
- 231
- Category
- Library
No coin nor oath required. For personal study only.
✦ Synopsis
The Ruby® on Rails Notes for Professionals book is compiled from Stack Overflow Documentation, the content is written by the beautiful people at Stack Overflow. Text content is released under Creative Commons BY-SA. See credits at the end of this book whom contributed to the various chapters. Images may be copyright of their respective owners unless otherwise specified
✦ Table of Contents
Content list
About
Chapter 1: Getting started with Ruby on Rails
Section 1.1: Creating a Ruby on Rails Application
Section 1.2: Create a new Rails app with your choice of database and including the RSpec Testing Tool
Section 1.3: Generating A Controller
Section 1.4: Installing Rails
Section 1.5: Create a new Rails app with a non-standard database adapter
Section 1.6: Creating Rails APIs in JSON
Section 1.7: Generate a Resource with Scaolds
Chapter 2: Routing
Section 2.1: Resource Routing (Basic)
Section 2.2: Constraints
Section 2.3: Scoping routes
Section 2.4: Concerns
Section 2.5: Root route
Section 2.6: Split routes into multiple files
Section 2.7: Additional RESTful actions
Section 2.8: Member and Collection Routes
Section 2.9: Mount another application
Section 2.10: Nested Routes
Section 2.11: Redirection
Section 2.12: Redirects and Wildcard Routes
Section 2.13: Scope available locales
Section 2.14: URL params with a period
Chapter 3: ActiveRecord
Section 3.1: Creating a Model via generator
Section 3.2: Introduction to Callbacks
Section 3.3: Creating a Model manually
Section 3.4: Manually Testing Your Models
Section 3.5: Creating A Migration
Section 3.6: Create a Join Table using Migrations
Section 3.7: Using a model instance to update a row
Chapter 4: Views
Section 4.1: Structure
Section 4.2: Partials
Section 4.3: AssetTagHelper
Section 4.4: Replace HTML code in Views
Section 4.5: HAML - an alternative way to use in your views
Chapter 5: ActiveRecord Migrations
Section 5.1: Adding multiple columns to a table
Section 5.2: Add a reference column to a table
Section 5.3: Rollback migrations
Section 5.4: Add a new column with an index
Section 5.5: Run specific migration
Section 5.6: Redo migrations
Section 5.7: Add a new column to a table
Section 5.8: Remove an existing column from a table
Section 5.9: Add column with default value
Section 5.10: Running migrations in dierent environments
Section 5.11: Create a new table
Section 5.12: Running migrations
Section 5.13: Change an existing column’s type
Section 5.14: Create a hstore column
Section 5.15: Create a join table
Section 5.16: Add a self reference
Section 5.17: Create an array column
Section 5.18: Add an unique column to a table
Section 5.19: Checking migration status
Section 5.20: Changing Tables
Section 5.21: Adding a NOT NULL constraint to existing data
Section 5.22: Forbid null values
Chapter 6: Rails Best Practices
Section 6.1: Fat Model, Skinny Controller
Section 6.2: Domain Objects (No More Fat Models)
Section 6.3: Beware of default_scope
Section 6.4: Convention Over Configuration
Section 6.5: Don't Repeat Yourself (DRY)
Section 6.6: You Ain’t Gonna Need it (YAGNI)
Chapter 7: Naming Conventions
Section 7.1: Controllers
Section 7.2: Models
Section 7.3: Filenames and autoloading
Section 7.4: Views and Layouts
Section 7.5: Models class from Controller name
Chapter 8: ActionCable
Section 8.1: User Authentication
Section 8.2: [Basic] Server Side
Section 8.3: [Basic] Client Side (Coeescript)
Chapter 9: ActiveModel
Section 9.1: Using ActiveModel::Validations
Chapter 10: User Authentication in Rails
Section 10.1: Authentication using Devise
Section 10.2: Devise Controller Filters & Helpers
Section 10.3: Omniauth
Section 10.4: has_secure_password
Section 10.5: has_secure_token
Chapter 11: ActiveRecord Associations
Section 11.1: Polymorphic association
Section 11.2: Self-Referential Association
Section 11.3: belongs_to
Section 11.4: has_one
Section 11.5: has_many
Section 11.6: The has_many :through association
Section 11.7: The has_one :through association
Section 11.8: The has_and_belongs_to_many association
Chapter 12: ActiveRecord Validations
Section 12.1: Validating length of an attribute
Section 12.2: Validates format of an attribute
Section 12.3: Validating presence of an attribute
Section 12.4: Custom validations
Section 12.5: Validates inclusion of an attribute
Section 12.6: Grouping validation
Section 12.7: Validating numericality of an attribute
Section 12.8: Validate uniqueness of an attribute
Section 12.9: Skipping Validations
Section 12.10: Confirmation of attribute
Section 12.11: Using :on option
Section 12.12: Conditional validation
Chapter 13: ActiveRecord Query Interface
Section 13.1: .where
Section 13.2: .where with an array
Section 13.3: Scopes
Section 13.4: Get first and last record
Section 13.5: Ordering
Section 13.6: where.not
Section 13.7: Includes
Section 13.8: Joins
Section 13.9: Limit and Oset
Section 13.10: .find_by
Section 13.11: .delete_all
Section 13.12: ActiveRecord case insensitive search
Section 13.13: .group and .count
Section 13.14: .distinct (or .uniq)
Chapter 14: ActionMailer
Section 14.1: Basic Mailer
Section 14.2: Generating a new mailer
Section 14.3: ActionMailer Interceptor
Section 14.4: Adding Attachments
Section 14.5: ActionMailer Callbacks
Section 14.6: Generate a Scheduled Newsletter
Chapter 15: Rails generate commands
Section 15.1: Rails Generate Controller
Section 15.2: Rails Generate Migration
Section 15.3: Rails Generate Scaold
Section 15.4: Rails Generate Model
Chapter 16: Configuration
Section 16.1: Custom configuration
Chapter 17: I18n - Internationalization
Section 17.1: I18n with arguments
Section 17.2: Translating ActiveRecord model attributes
Section 17.3: Get locale from HTTP request
Section 17.4: Pluralization
Section 17.5: Set locale through requests
Section 17.6: Use I18n with HTML Tags and Symbols
Section 17.7: Use I18n in views
Chapter 18: Using GoogleMaps with Rails
Section 18.1: Add the google maps javascript tag to the layout header
Section 18.2: Geocode the model
Section 18.3: Show addresses on a google map in the profile view
Section 18.4: Set the markers on the map with javascript
Section 18.5: Initialize the map using a coee script class
Section 18.6: Initialize the map markers using a coee script class
Section 18.7: Auto-zoom a map using a coee script class
Section 18.8: Exposing the model properties as json
Chapter 19: File Uploads
Section 19.1: Single file upload using Carrierwave
Section 19.2: Nested model - multiple uploads
Chapter 20: Caching
Section 20.1: Russian Doll Caching
Section 20.2: SQL Caching
Section 20.3: Action caching
Section 20.4: Fragment caching
Section 20.5: Page caching
Section 20.6: HTTP caching
Chapter 21: ActionController
Section 21.1: Basic REST Controller
Section 21.2: Filters
Section 21.3: Generating a controller
Section 21.4: Rescuing ActiveRecord::RecordNotFound with redirect_to
Section 21.5: Display error pages for exceptions
Section 21.6: Output JSON instead of HTML
Section 21.7: Controllers (Basic)
Section 21.8: Parameters
Section 21.9: Filtering parameters (Basic)
Section 21.10: Redirecting
Section 21.11: Using Views
Chapter 22: Configuration
Section 22.1: Rails General Configuration
Section 22.2: Configuring assets
Section 22.3: Configuring generators
Section 22.4: Environments in Rails
Section 22.5: Database Configuration
Chapter 23: Safe Constantize
Section 23.1: Successful safe_constantize
Section 23.2: Unsuccessful safe_constantize
Chapter 24: Rails 5
Section 24.1: How to install Ruby on Rails 5 on RVM
Section 24.2: Creating a Ruby on Rails 5 API
Chapter 25: Authorization with CanCan
Section 25.1: Getting started with CanCan
Section 25.2: Handling large number of abilities
Section 25.3: Defining abilities
Section 25.4: Quickly test an ability
Chapter 26: Mongoid
Section 26.1: Fields
Section 26.2: Installation
Section 26.3: Creating a Model
Section 26.4: Classic Associations
Section 26.5: Embedded Associations
Section 26.6: Database Calls
Chapter 27: Gems
Section 27.1: Gemfiles
Section 27.2: What is a gem?
Section 27.3: Bundler
Section 27.4: Gemsets
Chapter 28: Change default timezone
Section 28.1: Change Rails timezone AND have Active Record store times in this timezone
Section 28.2: Change Rails timezone, but continue to have Active Record save in the database in UTC
Chapter 29: Asset Pipeline
Section 29.1: Manifest Files and Directives
Section 29.2: Rake tasks
Section 29.3: Basic Usage
Chapter 30: Upgrading Rails
Section 30.1: Upgrading from Rails 4.2 to Rails 5.0
Chapter 31: ActiveRecord Locking
Section 31.1: Optimistic Locking
Section 31.2: Pessimistic Locking
Chapter 32: Debugging
Section 32.1: Debugging Rails Application
Section 32.2: Debugging Ruby on Rails Quickly + Beginner advice
Section 32.3: Debugging ruby-on-rails application with pry
Section 32.4: Debugging in your IDE
Chapter 33: Configure Angular with Rails
Section 33.1: Angular with Rails 101
Chapter 34: Rails logger
Section 34.1: Rails.logger
Chapter 35: Prawn PDF
Section 35.1: Advanced Example
Section 35.2: Basic Example
Chapter 36: Rails API
Section 36.1: Creating an API-only application
Chapter 37: Deploying a Rails app on Heroku
Section 37.1: Deploying your application
Section 37.2: Managing Production and staging environments for a Heroku
Chapter 38: ActiveSupport
Section 38.1: Core Extensions: String Access
Section 38.2: Core Extensions: String to Date/Time Conversion
Section 38.3: Core Extensions: String Exclusion
Section 38.4: Core Extensions: String Filters
Section 38.5: Core Extensions: String Inflection
Chapter 39: Form Helpers
Section 39.1: Creating a search form
Section 39.2: Dropdown
Section 39.3: Helpers for form elements
Chapter 40: ActiveRecord Transactions
Section 40.1: Basic example
Section 40.2: Dierent ActiveRecord classes in a single transaction
Section 40.3: Multiple database connections
Section 40.4: save and destroy are automatically wrapped in a transaction
Section 40.5: Callbacks
Section 40.6: Rolling back a transaction
Chapter 41: RSpec and Ruby on Rails
Section 41.1: Installing RSpec
Chapter 42: Decorator pattern
Section 42.1: Decorating a Model using Draper
Section 42.2: Decorating a Model using SimpleDelegator
Chapter 43: Elasticsearch
Section 43.1: Searchkick
Section 43.2: Installation and testing
Section 43.3: Setting up tools for development
Section 43.4: Introduction
Chapter 44: React with Rails using react-rails gem
Section 44.1: React installation for Rails using rails_react gem
Section 44.2: Using react_rails within your application
Section 44.3: Rendering & mounting
Chapter 45: Rails Cookbook - Advanced rails recipes/learnings and coding techniques
Section 45.1: Playing with Tables using rails console
Section 45.2: Rails methods - returning boolean values
Section 45.3: Handling the error - undefined method `where' for #
Chapter 46: Multipurpose ActiveRecord columns
Section 46.1: Saving an object
Section 46.2: How To
Chapter 47: Class Organization
Section 47.1: Service Class
Section 47.2: Model Class
Chapter 48: Shallow Routing
Section 48.1: Use of shallow
Chapter 49: Model states: AASM
Section 49.1: Basic state with AASM
Chapter 50: Rails 5 API Authetication
Section 50.1: Authentication with Rails authenticate_with_http_token
Chapter 51: Testing Rails Applications
Section 51.1: Unit Test
Section 51.2: Request Test
Chapter 52: Active Jobs
Section 52.1: Introduction
Section 52.2: Sample Job
Section 52.3: Creating an Active Job via the generator
Chapter 53: Rails frameworks over the years
Section 53.1: How to find what frameworks are available in the current version of Rails?
Section 53.2: Rails versions in Rails 1.x
Section 53.3: Rails frameworks in Rails 2.x
Section 53.4: Rails frameworks in Rails 3.x
Chapter 54: Nested form in Ruby on Rails
Section 54.1: How to setup a nested form in Ruby on Rails
Chapter 55: Factory Girl
Section 55.1: Defining Factories
Chapter 56: Import whole CSV files from specific folder
Section 56.1: Uploads CSV from console command
Chapter 57: Tools for Ruby on Rails code optimization and cleanup
Section 57.1: If you want to keep your code maintainable, secure and optimized, look at some gems for code optimization and cleanup :
Chapter 58: ActiveJob
Section 58.1: Create the Job
Section 58.2: Enqueue the Job
Chapter 59: Active Model Serializers
Section 59.1: Using a serializer
Chapter 60: Rails Engine - Modular Rails
Section 60.1: Create a modular app
Chapter 61: Single Table Inheritance
Section 61.1: Basic example
Section 61.2: Custom inheritance column
Section 61.3: Rails model with type column and without STI
Chapter 62: ActiveRecord Transactions
Section 62.1: Getting Started with Active Record Transactions
Chapter 63: Turbolinks
Section 63.1: Binding to turbolink's concept of a page load
Section 63.2: Disable turbolinks on specific links
Section 63.3: Understanding Application Visits
Section 63.4: Cancelling visits before they begin
Section 63.5: Persisting elements across page loads
Chapter 64: Friendly ID
Section 64.1: Rails Quickstart
Chapter 65: Securely storing authentication keys
Section 65.1: Storing authentication keys with Figaro
Chapter 66: Authenticate Api using Devise
Section 66.1: Getting Started
Chapter 67: Integrating React.js with Rails Using Hyperloop
Section 67.1: Adding a simple react component (written in ruby) to your Rails app
Section 67.2: Callbacks
Section 67.3: Declaring component parameters (props)
Section 67.4: HTML Tags
Section 67.5: Event Handlers
Section 67.6: States
Chapter 68: Change a default Rails application enviornment
Section 68.1: Running on a local machine
Section 68.2: Running on a server
Chapter 69: Rails -Engines
Section 69.1: Famous examples are
Chapter 70: Adding an Amazon RDS to your rails application
Section 70.1: Consider we are connecting MYSQL RDS with your rails application
Chapter 71: Payment feature in rails
Section 71.1: How to integrate with Stripe
Chapter 72: Rails on docker
Section 72.1: Docker and docker-compose
Appendix A: Reserved Words
Section A.1: Reserved Word List
Credits
You may also like
📜 SIMILAR VOLUMES
What people are saying about Notes for Professionals books This is perfect for me who's learning to code! Some good books on programming!! Amazing collection of free programming books. Whoah, this is awesome! Thanks!!!!!! Good stuff thanks These are very good! I would
Nothing less than a revolution in the way web applications are constructed,Ruby on Rails (RoR) boasts a straightforward and intuitive nature that avoids programming repetition and makes it infinitely easier to build for the web. This book captures the current best practices to show you the most effi
The Complete Guide to Avoiding and Fixing Common Rails 3 Code and Design Problems As developers worldwide have adopted the powerful Ruby on Rails web framework, many have fallen victim to common mistakes that reduce code quality, performance, reliability, stability, scalability, and maintainability.
“Ruby on Rails™ 3 Tutorial: Learn Rails by Example by Michael Hartl has become a must read for developers learning how to build Rails apps.” —Peter Cooper, Editor of Ruby Inside Using Rails 3, developers can build web applications of exceptional elegance and power. Although its remarkable capabili