-
Creating a New Project
After watching this video; you will be able to create a new project.
-
Modules
In Ruby; you can use modules just like in other languages to easily add a set of related functions or methods that are contained within a single package or namespace. In this video; Mike McMillan demonstrates how to create a module and use it within a Ruby program.
-
Input Validation
Ruby on Rails contains several validation rules that you can add to the ActiveRecord model. In this video; Mike Mcmillan demonstrates how input validation rules work in data records.
-
Access Control
In Ruby; you can use Access Control to call methods and instance variables in a class. In this video; Mike McMillan demonstrates how to define a simple name class to show you how Access Control works.
-
Scaffolding
In Ruby on Rails; scaffolding creates not only a model; but also a view and the controllers that you need to access the model and add data to it. In this video; Mike McMillan uses the rails generate scaffold command to create the scaffold for a table.
-
Overloading Methods
Unlike most modern languages; a Ruby class can only have a single method with a given name. By adding logic you can simulate method overloading in certain situations. In this video; Mike McMillan demonstrates how to achieve the flexibility of method overloading in Ruby by defining default parameter arguments for a particular method.
-
Adding an API to an Existing Rails Project
When Developing Web APIs using Ruby on Rails; you can add an API to an existing web-based application. In this video; Jay Wengrow demonstrates how to do this in Ruby on Rails using the URL namespacing concept without confusing the HTML routes and controllers with the API routes and controllers.
-
API Endpoint for CREATE
When Developing Web APIs using Ruby on Rails; the CREATE action facilitates creating a new employee via the API. In this video; Jay Wengrow explains how to develop Web APIs using Ruby on Rails: API endpoint for CREATE.
-
API Endpoint for DESTROY
When developing Web APIs using Ruby on Rails; you can remove database records that match certain conditions by instantiating each record and calling its destroy method. In this video; Jay Wengrow demonstrates how to use Ruby on Rails to delete a record from a database via the API.
-
API Endpoint for INDEX
When Developing Web APIs using Ruby on Rails; an index action retrieves all the employees from the database. In this video; Jay Wengrow explains how to build the INDEX action using Ruby on Rails.
-
API Endpoint for SHOW
When Developing Web APIs using Ruby on Rails; a SHOW action delivers data about a particular employee specified by its ID. In this video; Jay Wengrow explains how to add a SHOW endpoint for an API when developing Web APIs using Ruby on Rails.
-
API Endpoint for UPDATE
In Developing Web APIs Using Ruby on Rails; you can use the UPDATE action to update attributes of an employee through the API. In this video; Jay Wengrow demonstrates how to use the PATCH http verb to update attributes of an employee with a given id and how to set up a response when the targeted id does not exist.
-
API Versioning
When developing Web APIs; Ruby on Rails allows users to add API versioning. In this video; Jay Wengrow demonstrates how to use Ruby on Rails API versioning.
-
Authenticating Your API Manually
When Developing Web APIs using Ruby on Rails; you can restrict user access to the API or certain parts thereof. In this video; Jay Wengrow demonstrates how to create a lightweight but effective authentication system in Ruby on Rails which can be customized to fit individual needs.
-
Automatic Testing Your API with RSpec
When Developing Web APIs using Ruby on Rails; you can test to make sure that your API is working from start to finish. In this video; Jay Wengrow demonstrates how to create an automated test suite using the RSpec gem for integration testing in Ruby on Rails.
-
Documenting Your API with apipie_rails
When Developing Web APIs with Ruby on Rails; the API can be documented with the rdoc tool. In this video; Jay Wengrow demonstrates how to use the alternative apipie-rails gem to document the API in Ruby on Rails. He also shows the components of the apipie-rails gem and explains how it functions.
-
Documenting your API with rdoc
When developing Web APIs; Ruby on Rails allows users to integrate the Rdoc extension into the coding infrastructure. In this video; Jay Wengrow demonstrates how to use Ruby on Rails to document APIs using the Rdoc extension.
-
Generating XML with XML Builder
When Developing Web APIs in Ruby on Rails; you can use the XML Builder tool to configure XML. In this video; Jay Wengrow demonstrates how to configure XML without using any Gems.
-
Manually Testing Your Rails API with Postman
When Developing Web APIs using Ruby on Rails; you can manually test your API using Postman. In this video; Jay Wengrow demonstrates how to use the Postman REST Client to do complex Ruby on Rails API testing. He also demonstrates how to save and group test Collections for continued usage.
-
Performance Testing Your API with rails-perftest
When Developing Web APIs using Ruby on Rails; it is important to test the functionality and performance of your API. In this video; Jay Wengrow demonstrates how to use the rails-perftest in Ruby on Rails to test the speed at which aspects of the API perform.
-
Rendering JSON Manually
When developing Web APIs; Ruby on Rails allows users to develop web APIs manually using its coding infrastructure. In this video; Jay Wengrow demonstrates how to use Ruby on Rails to render JSON manually.
-
Rendering JSON or XML with the rabl Gem (JSON and XML)
When developing Web APIs; Ruby on Rails allows users to use JSON and XML in conjunction with its own coding infrastructure. In this video; Jay Wengrow demonstrates how to use Ruby on Rails to render JSON or XML with the Rabl gem.
-
Rendering JSON with active_model_serializers
After watching this video; you will be able to render JSON with active_model_serializers.
-
Rendering JSON with the jbuilder Gem (JSON)
When Developing Web APIs; Ruby on Rails allows users to render JSON using its coding infastructure. In this video; Jay Wengrow demonstrates how to use Ruby on Rails to render JSON with the JBuilder Gem.
-
Setting Up Your API
When Developing Web APIs using Ruby on Rails; you need to understand the concepts involved with building an API. In this video; Jay Wengrow explains how to set up an API using Ruby on Rails.
-
Speed Up Your JSON with oj Gem
When developing Web APIs; Ruby on Rails allows users to speed up JSON rendering using the Rails coding infrastructure. In this video; Jay Wengrow demonstrates how to use the Ruby on Rails OJ Gem to speed up JSON rendering.
-
Speed up your XML with the ox gem
When developing Web APIs; Ruby on Rails allows users to speed up code rendering. In this video; Jay Wengrow demonstrates how to use the Ruby on Rails OX Gem to speed up XML rendering.
-
Using rails-api Gem
Ruby on Rails allows users to develop web APIs using its coding infrastructure. In this video; Jay Wengrow demonstrates how to use the Ruby on Rails-API gem.
-
Class Getters and Setters
Ruby includes methods that allow you to create getters and setters that are used to retrieve and set the values of instance variables when defining a class. In this video; Mike McMillan uses the attr_reader method to define a getter method that returns an instance variable; before demonstrating how to change the values in a class using a setter method.
-
Distributing Applications
The OCRA gem makes it easy to distribute a Ruby application. In this video; Mike McMillan demonstrates how to use OCRA to convert a Ruby program into an executable.
-
Ducktyping
In Ruby; the ducktyping feature ensures that an object is defined less by what type or class it is; but rather by what methods can be called and operations performed on it. In this video; Mike McMillan demonstrates how ducktyping is applied within Ruby.
-
Enumerable
The Enumerable module in Ruby allows you to iterate elements; such as arrays; in a collection. In this video; Mike McMillan demonstrates examples using the .select; the .reject method; the === operator; the .sort method; and the .all? method which are available in the Enumerable module.
-
For Loop and Ranges
In Ruby; using the for loop with ranges allows you to iterate over a body of statements a set number of times and enables you to process the elements on an array. In this video; Mike McMillan demonstrates the range data structure; uses it with a for loop; and accesses the elements of an array with a for loop.
-
GetOptLong
In Ruby; you can use the GetOptLong method to process command line argument options. In this video; Mike McMillan demonstrates how to use the GetOptLong method to processing command line arguments program to create a copy program in Ruby.
-
Getting Data Into and Out of Programs
Ruby includes commands and methods that allow you to enter data into a program; and also output and display data from a program. In this video; Mike McMillan uses the gets methods to input data; and the print and puts methods to output data to the Ruby console.
-
Hashes
In Ruby on Rails; the hash is a very common data structure for storing key value pairs. In this video; Mike McMillan uses the hash name to retrieve a value by specifying the key in subscript notation.
-
Higher Math
Ruby contains a number of higher math functions. In this video; Mike McMillan demonstrates how to gain access to the higher math functions within the Ruby shell in order to use them.
-
Accessors and Virtual Attributes
In Ruby; you can write Attribute Methods to provide ways of getting data into a class object and also retrieving data from a class object. In this video; Mike McMillan demonstrates how to write Accessors which streamline the attribute reading and attribute writing processes. He also demonstrates how to define and use the Virtual Attribute method.
-
Adding Methods to a Class
In Ruby; classes are open; providing you with the ability to avoid cluttering the classes' definition by adding methods to the class from within only a particular program. In this video; Mike McMillan imports a class into a program before demonstrating how to extend the definition of the class for that specific program by adding methods to the class.
-
Advanced Arrays
Ruby allows you to execute advanced and powerful tasks with arrays that can't be done in several other languages. In this video; Mike McMillan demonstrates adding and subtracting arrays; combining arrays; isolating unique elements in arrays; as well as adding and removing elements from arrays.
-
Blocks
Blocks can be used in Ruby to group sections of code together that are delimited using curly braces for single-line blocks and do...ends for multiple line blocks. Blocks can also be associated with method calls by calling yield. In this video; Mike McMillan demonstrates how to create and use blocks within Ruby.
-
Blocks for iteration
In Ruby; blocks are primarily used for iteration. Elements from arrays or ranges can be easily stored within blocks to assist with the particular tasks that are performed. In this video; Mike McMillan demonstrates how to use blocks for iteration in Ruby.
-
Blocks for Later Execution
In Ruby; you can create blocks of code which can be executed at a later time. In this video; Mike McMillan demonstrates how to create blocks using initialize and multiplication methods.
-
Booleans
In Ruby; Boolean expressions return a true or false value. In this video; Mike McMillan demonstrates several ways one can write Boolean expressions using the Ruby shell.
-
Code Organization
In Ruby; there is definite and logical order to the way code should be laid out. In this video; Mike McMillan demonstrates how to create a typical layout of the code for a sample program in Ruby.
-
Constants
You can use Ruby to create and apply constants. In this video; Mike McMillan demonstrates how constants are more of a suggestion in Ruby than an absolute; how to create constants and assign them a value; as well as how they behave in Ruby.
-
Data Types and Variables
Variables in Ruby provide the flexibility to store; hold; and return data of any type in your program without needing to declare the variable first. In this video; Mike McMillan demonstrates how to assign number; string; and Boolean data values to a variable before highlighting the differences between local and global variables.
-
Date and Time
In Ruby; the best way to edit the date and time is to use the date library. In this video; Mike McMillan demonstrates how to use the date library and its key features.
-
Default Parameter Values
In Ruby; you can present default parameters or default values for parameters when defining functions. In this video; Mike McMillan demonstrates how to define a parameter with a default value and add an argument to the function call to indicate when the default value is incorrect or insufficient.
-
Defining a Private Method
In Ruby you can define a private method as an internal helper method that isn't part of the public API of the class that controls access to objects in your program. In this video; Mike McMillan demonstrates how to create a class that references a private method; and how a private method can't be accessed from the main program interface.
-
Defining Class and to_s Method
In Ruby you define a class as the basic template from which object instances are created; and use the to_s method to display the current state of an object. In this video; Mike McMillan creates a Ruby program to demonstrate the basics of defining a class; initializing an object; and returning an objects state.
-
IDE Options
The RubyMine IDE provides you with tools and facilities designed specifically for use in Ruby software development. In this video; Mike McMillan demonstrates how to create and run a new project in RubyMine.
-
Idiomatic
Ruby supports the use of idiomatic language. Programmers can use particular idioms just like in other languages; such as to use expressions instead of statements. In this video; Mike McMillan demonstrates some of the most common Ruby idioms and explains when to use them.
-
Installing and Rails
You can download and install Ruby on Rails for multiple environments from the RailsInstaller Web site. In this video; Mike McMillan demonstrates how to download and save Ruby on Rails for Microsoft Windows; initialize the RailsInstaller; go through the installation process; and test the installation by opening the Ruby Shell.
-
Iterators
In Ruby; you can use an iterator to call elements from objects. Iterators work on collections and ranges. In this video; Mike McMillan demonstrates using the shell to call the color element from a collection. He also demonstrates iterators that work on numbers and letters.
-
Lambdas
In Ruby; creating lambda expressions allows you to name; and easily call and reuse calculations. In this video; Mike McMillan demonstrates how to create a lambda; use it in an operation; and use it within another lambda.
-
Marshaling in
Marshalling in Ruby is a feature that provides the ability to serialize objects; allowing you to store a specific object for future loading or send it to another program. In this video; Mike McMillan creates an object before using the Marshal.dump() method to save the object to a file; and then reconstitute it using the Marshal.load() method.
-
Method Aliasing
Method aliasing provides the functionality in Ruby that allows you to override methods and alter the behavior of the class while retaining the origin implementation of the method. In this video; Mike McMillan demonstrates how to create an aliased method and use it to redefine the way in which a class performs a specific task.
-
Method Name Conventions
In Ruby; you can use several naming conventions to name Ruby methods. In this video; Mike McMillan demonstrates the naming conventions for standard; multi-word; Boolean; Predicate; Mutator; and dangerous methods.
-
MiniTest
In Ruby; you can use MiniTest to assess whether your newly created methods are working correctly. In this video; Mike McMillan demonstrates how to create and run an instance of unit testing with MiniTest in Ruby.
-
Mixins
In Ruby; you can include mixins in your classes; allowing the contents of the mixin to be implemented as part of the class during compilation. In this video; Mike McMillan demonstrates how to include a mixin in an example class.
-
Mutability and Immutability in Objects
By default; objects in Ruby are mutable; allowing you to alter their state. You can change an object to immutable and ensure that its state doesn't change after creation. In this video; Mike McMillan demonstrates how to make a string immutable by using the freeze method.
-
Nil
Unlike many coding languages; the value Nil is an object that has a value within Ruby. In this video; Mike McMillan demonstrates how the Nil value functions within Ruby.
-
Numbers
Ruby allows you to use integer and floating point numbers. You can also use two classes of numbers – Fixnum and Bignum. In this video; Mike McMillian demonstrates the Fixnum class; Bignum class; integer numbers; and floating point numbers using the Ruby Pickaxe book.
-
Object Equality
Ruby provides several equality test methods that allow objects to determine whether they are equal to; greater than; or less than other objects. In this video; Mike McMillan highlights the main operators that allow you to test object equality in different situations within Ruby.
-
Overriding Methods
Method overriding in Ruby is a feature that allows you to provide a specific method implementation in a subclass by replacing the implementation that is already provided by one of its superclasses. In this video; Mike McMillan overrides the built-in to_s method to return meaningful results before demonstrating how to redefine a method within a custom superclass.
-
Parallel Assignment
In Ruby; you can assign and reassign values using the parallel assignment method. In this video; Mike McMillan demonstrates how to switch the values assigned to variables and arrays using parallel assignment method.
-
Procs
In Ruby; creating procs allows you to name; call; and reuse blocks. This way; you can avoid typing out the block for each instance to help decrease coding errors. In this video; Mike McMillan demonstrates how to create and use a proc.
-
Random Numbers
In Ruby; you can generate random numbers for areas; such as probabilistic techniques in programming and generating data. In this video; Mike McMillan demonstrates how to generate random numbers with a maximum value and specific range; reproduce specific sequences; and retrieve a random element.
-
Ranges
Ruby includes a range of features that can be used to help when representing ranges. In this video; Mike McMillan demonstrates how to work with ranges inside of Ruby.
-
Gems
In Ruby; you can quickly and easily install packages of applications and libraries. These built-in packages of add-in tools are called RubyGems. In this video; Mike McMillan demonstrates how to use RubyGems to install a rake program; which is a make utility for Ruby programs.
-
Running Programs
You can run Ruby interactively from within the Ruby Shell or as a script or program from the command prompt. In this video; Mike McMillan demonstrates how to open the Ruby Shell and enter expressions and statements which are evaluated and returned to you; before quitting the Shell and running a program from the command prompt.
-
Scope in Variables
In Ruby; you can use variable scoping for loops and blocks. In this video; Mike McMillan demonstrates variable scoping; while-loops; and do-loops; and then assigns variables outside loops.
-
Self Object
In Ruby; you refer to the current object in computation as 'self'. In this video; Mike McMillan demonstrates how the keyword 'self' is used; creates an object called 'self'; and writes a method to compare two objects to determine if they're the same.
-
Sets
In Ruby; set classes allows you to group together a range of unordered values with no duplicates. In this video; Mike McMillan demonstrates how to create a set; and perform basic set operations.
-
Strings
Ruby allows you to create strings by using string literals with delimiters. You can also embed special characters and expressions into strings. In this video; Mike McMillan demonstrates how to a display string using single quotes (') and double quotes (") as well as embed escape characters and expressions into strings.
-
Struct
In Ruby; you can use structures to combine attributes under the same object name without having to create a class. In this video; Mike McMillan demonstrates creating a structure within the Shell and specifies the attributes for each item in the structure.
-
Symbols
In Ruby on Rails; you will sometimes find that it's better to use symbols instead of strings. In this video; Mike McMillan uses the object_id to demonstrate the difference between a string and symbol.
-
Using method_missing
In Ruby; you can use the method_missing method to handle the user of a class calling a method that isn't a part of the class interface. In this video; Mike McMillan demonstrates writing the method_missing method and adding a display message.
-
Variable Length Arguments
In Ruby; you’re able to create methods that have variable length arguments and work with them in different ways. In this video; Mike McMillan demonstrates how to create a method in the Command Shell that has a variable length argument.
-
While and Until Loops
Ruby allows you to use the While and Until Loops to execute statements while or until a specified condition is true. In this video; Mike McMillan uses a loop-control variable or sentinel value to evaluate input before running the same program using the While and Until Loops; achieving the same result by redefining the logic of the evaluating condition.
-
Case Expressions
In Ruby; you can use the case statement as an alternative to the if statement to perform branching. In this video; Mike McMillan demonstrates how to use the case statement in a sample program in Ruby.
-
Routes – Get Requests for Singular Resources
In Ruby on Rails; by generating a controller and defining pages you allow routes to be created that provide a way to redirect incoming requests to controllers and actions. In this video; Mike McMillan demonstrates how to create a new project and generate a controller; and examines the routes that serve GET requests for a singular resource.
-
Routes – Naming Routes
Ruby on Rails provides options that allow you to override the automatically-generated names of routes by renaming or routing new routes to existing ones. In this video; Mike McMillan demonstrates how to rename a route using the as: option; and how to use the to: option while creating a new route that routes to an existing route in an application.
-
Routes – Root :to
Ruby's routing rules allow you to define a route to your application's root URL. In this video; Mike McMillan demonstrates how to configure and customize the routes file; uncommenting and customizing the rule defining the route to your application's root page.
-
Routes – Route Constraints
Ruby constraints allow you to use parameters to precisely define the data input acceptable to a URL. In this video; Mike McMillan demonstrates route constraints and shows you how to define the parameters of a constraint restricting input to date-type values.
-
Routes – Route Parameters
Ruby on Rails allows you to define parameters for the routes in your application that let you better direct and extend what the user can accomplish. In this video; Mike McMillan demonstrates how to create a new project and add a route parameter that retrieves data for a specific day when a user enters the date.
-
Routes – Route Redirects
Ruby route redirects allow your application to accept alternate URLs or input and still direct users to your project's correct pages. In this video; Mike McMillan demonstrates route redirects and shows you how to generate a controller in the Ruby Shell and create routes or web pages for your project.
-
Scaffolding – Adding Data to the Database
Ruby allows you to migrate a database and generate data for it once the scaffolding has been generated. In this video; Mike McMillan uses the rake db:migrate command to migrate a database; before populating it with data written to the Ruby seeds file which is executed using the rake db:seed command.
-
Scaffolding – Generating Scaffolding
Ruby allows you to generate a project and its scaffolding; including the project Model; a web-based GUI for the View; and a Controller. In this video; Mike McMillan demonstrates how to generate a project using the rails new command; before using the rails generate scaffold command to generate its scaffolding.
-
Scaffolding – Routes
A Ruby project's scaffolding includes all the routes the project needs. In this video; Mike McMillan demonstrates how to generate the project routes using the rake routes command; before describing the resulting forms and web pages as roadmaps worked with or modified to provide users easy access to your Ruby project.
-
Seeding Data
Ruby allows you to write data to – or seed – your project database. In this video; Mike McMillan demonstrates how to open the seeds.rb file in his database directory; the syntax required to write data for a database; and use the rake db:seed command to populate his database which he then reviews in a Ruby console.
-
Tests – Automatically Generated Tests
Ruby on Rails automatically provides a set of tests allowing you to write validation rules for your application as soon as you generate your project's scaffolding. In this video; Mike McMillan demonstrates how to access and use the tests generated with Ruby's scaffolding to write and test validation rules; as well as analyze their results.
-
Tests – Functional Tests
Ruby on Rails automatically generates functional tests allowing you to test the code in your project's controller. In this video; Mike McMillan demonstrates how to access Ruby's functional test files; introduces multiple test types; and details their uses and potential for customization.
-
Using ActiveRecord – Creating a Model (Database)
Ruby on Rails allows you to use Rails to create a database in which to store project data. In this video; Mike McMillan demonstrates how to create a new project using the rails new command; and use the rails generate model command; a database name; and a list of defined string and integer fields; to generate a project database.
-
Using ActiveRecord – Defining Default Values
In Ruby on Rails; when the value of a specified field in a database doesn't change; you can easily define default values when the Active Record object is created using a callback. In this video; Mike McMillan demonstrates how to use the after_initialize callback method to save time by setting default values when creating a new record.
-
Using ActiveRecord – Migrations
In Ruby on Rails; migrations are a feature of Active Record that provide a convenient way for you to manipulate your database in a consistent and efficient way. In this video; Mike McMillan demonstrates how to add a field to a table using an add migration before running the migration using a Rake task.
-
Using ActiveRecord – Validating Data
Ruby on Rails helps you ensure that only valid data is saved into your database by validating the state of objects using Active Record's validations feature. In this video; Mike McMillan demonstrates how to add validation code to a model that validates the presence of data in specified fields when entering a record into a table.
-
Using the Rails Console
The Rails console gives you a full Ruby Shell and all the functionality you need to manage an application-development environment. In this video; Mike McMillan demonstrates how to activate the Rails console; its ability to mimic the Ruby Shell; work with Active Record in database development and maintenance; explore the Rails development environment; and utilize tools and commands.
-
Adding a Static Web Page
In addition to the pages it automatically generates; Ruby on Rails allows you to easily integrate static web pages into your Rails project that are useful for content that never changes. In this video; Mike McMillan demonstrates how to create a simple static HTML page in the public directory within a Rails project.
-
Adding Data to a Database
With a database set up; Ruby on Rails allows you to easily create; save; and instantiate new records into the database using the Rails console in Command Prompt. In this video; Mike McMillan uses the create and new methods to enter data into a database before demonstrating how to recall the data from the database.
-
Cookies – Permanent Cookies
Ruby on Rails allows developers to store cookies on a user's browser for longer than the current session. In this video; Mike McMillan demonstrates how to call the permanent method to extend the life of a cookie to 20 years; and tests the change in a browser.
-
Cookies – Using Cookies
Ruby on Rails allows developers to specify cookies for storing data on a user's browser. In this video; Mike McMillan demonstrates how to create a new application with set_cookies; display_cookies; and remove_cookies. He then inserts test data in a table and tests the functionality in a browser.
-
Creating a Dynamic Web Page
Ruby on Rails allows you to create dynamic web pages by combining HTML and embedded Ruby (erb) code by way of a controller and a view. In this video; Mike McMillan demonstrates how to generate a controller and a view before writing a simple Ruby program to show how Ruby code can be called dynamically from a web page.
-
Deleting Records
Ruby on Rails provides two different methods for deleting database records that need to be understood in order to maintain consistency in the database. In this video; Mike McMillan demonstrates how to use the delete and destroy methods in Rails to remove records from a database while highlighting the differences between these two methods.
-
Forms – Data-Input Workflow
Ruby on Rails creates a data workflow in an application to automatically generate forms; for instance; from the Rails scaffolding. In this video; Mike McMillan demonstrates how much of the work needed to add a new form to a project is done in the background by Rails.
-
How to Do Redirects
Ruby on Rails allows you to seamlessly redirect the user's browser from the original page called in an application to a new URL that you specify in the controller action. In this video; Mike McMillan demonstrates how to use the redirect_to method in a controller file to redirect an application page to a specified target URL.
-
Methods for Displaying Data
Ruby on Rails conveniently includes methods that allow you to easily display specific database records without having to use SQL commands. In this video; Mike McMillan demonstrates the built-in Rails methods used to display the first or last record; all of the records; or even one particular field of data in a table.
-
Rake Stats
Ruby on Rails allows developers to automatically generate statistics that provide an overview of a project. In this video; Mike McMillan demonstrates how to generate and interpret a project's statistics; and points out that the most important statistic is the code-to-test ratio which highlights how well crucial functionality is tested.
-
Scaffolding – Examining the Controller
Ruby on Rails provides developers with a controller in the application's directory; which is a blueprint containing all the methods that the application will call. In this video; Mike McMillan demonstrates how to access the controller and describes each method and its function.
-
Sessions – Breadcrumbs
Ruby on Rails allows developers to specify breadcrumbs so that the user can see the path they have followed while browsing a website. In this video; Mike McMillan demonstrates how to specify breadcrumbs by modifying code in the controller for the application.
-
Sessions – reset_session
Ruby on Rails allows developers to reset a session; which in turn resets the breadcrumbs to nil. In this video; Mike McMillan demonstrates how and where to define the reset_session method to clear the browsing history and store the pages from the previous session.
-
Sessions – Saving Sessions in a Database
Ruby on Rails allows developers to save session data to the database rather than a cookie in the user's browser. In this video; Mike McMillan demonstrates how to modify the gemfile; migrate the active record; and change the location of stored session data in the session store file.
-
Tests – Integration Tests
Ruby on Rails allows developers to test several controllers by running integration tests. In this video; Mike McMillan demonstrates how to manually create an integration test; since they are not automatically generated by the scaffolding. The sample test tests for a blank username when creating a new grade in the application.
-
Tests – Static Fixtures
Ruby on Rails allows developers to use static fixtures to generate test data in YAML format to test an application's model. In this video; Mike McMillan demonstrates where to find the static fixtures in the project directories and how to create a set of test data for the application.
-
Tests – Unit Tests
Ruby on Rails allows developers to use unit tests to test their application's model. In this video; Mike McMillan demonstrates how to attempt tasks in a project then make assertions about the results of the tasks; which can then be cast as unit tests.
-
Using ActiveRecord – Averages; Counts and Sums
Ruby on Rails allows developers to perform calculations on data stored in a database. In this video; Mike McMillan demonstrates how to compute sums; counts; and averages in the console.
-
Using ActiveRecord – Creating New Records with Scopes
Using Active Record in Ruby on Rails allows you to create new records in a table of data using scopes. In this video; Mike McMillan demonstrates how to create a new scope; and how to create a new record by calling the scope with the build command and assigning a new variable.
-
Using ActiveRecord – Defining a Scope
In Ruby on Rails; Active Rails allows you to define scope methods inside the class to specify commonly-used queries which can be referenced as method calls. In this video; Mike McMillan demonstrates how to write class methods in the model file; and perform a search type query using the defined scope in the Rails console.
-
Using ActiveRecord – Includes
In Ruby on Rails; Active Record provides the includes method that allows you to combine data from two or more tables by specifying all the associations that are going to be loaded. In this video; Mike McMillan demonstrates the similarities and differences between using the includes and joins methods while performing queries on records in different models.
-
Using ActiveRecord – Joins
In Ruby on Rails; Active Record provides a finder method called joins that allows you to produce join queries on multiple tables in your project. In this video; Mike McMillan demonstrates how to create new records in separate models within a project; and how to perform a join that combines the data from two tables while querying the records.
-
Using ActiveRecord – Locking
In Ruby on Rails; Active Record supports optimistic locking that allows multiple users to access the same record for edits by checking for conflicts with the data. In this video; Mike McMillan demonstrates how to create a new record that includes the lock_version hidden field; and how records that are instantiated twice will raise an error.
-
Using ActiveRecord – Maximums and Minimums
Ruby on Rails allows developers to determine minimum and maximum values of data in a database. In this video; Mike McMillan demonstrates how to calculate the minimum and maximum values of both numeric and lexigraphical items in a table using the Rails console.
-
Using ActiveRecord – Passing in Arguments to a Scope
In Ruby on Rails; once your scope has been defined; Active Record allows you to pass arguments to the scope thereby improving its flexibility so you can easily change the outcome of queries. In this video; Mike McMillan demonstrates how to add a parameter to a class scope method; before using an argument to return different query results effortlessly in the console.
-
Using SQL Where Queries
Ruby on Rails allows you to execute regular SQL queries in the Rails console using the WHERE clause to extract records that fulfil a specific criterion. In this video; Mike McMillan demonstrates how to write a SQL statement using the LIKE operator in a WHERE clause to search for a specific pattern in a table column.
-
Adding Rails-API to an Existing Project
After watching this video; you will be able to add rails-api to an existing project.
-
Authenticating with Sessions
After watching this video; you will be able to use SessionsController for issuing and validating access tokens.
-
Calling the Mailer
After watching this video; you will be able to implement the mail call in controller.
-
Coding Links to Assets
After watching this video; you will be able to code links to assets.
-
Configuring Application Secrets
After watching this video; you will be able to describe where the secrets.yml file is found and what is contained within it.
-
Configuring Devise
After watching this video; you will be able to configure Devise.
-
Configuring Pundit
After watching this video; you will be able to configure Pundit.
-
Configuring RSpec
After watching this video; you will be able to configure RSpec.
-
Defining Rails
After watching this video; you will be able to describe Rails.
-
Deploying Web Applications with Unicorn
After watching this video; you will be able to implement unicorn as a web server.
-
Documenting Resources Using Apipie
After watching this video; you will be able to document resources and actions using Apipie.
-
Examining Asset Fingerprinting and Minification
After watching this video; you will be able to use fingerprinting and mimification.
-
Examining Constraints
After watching this video; you will be able to recall what some of the migration and database constraints are.
-
Examining Endpoint for SHOW; UPDATE; and DESTROY
After watching this video; you will be able to work with endpoint for SHOW; UPDATE; and DESTROY.
-
Examining Endpoints for INDEX and CREATE
After watching this video; you will be able to work with endpoints for INDEX and CREATE.
-
Examining Logging
After watching this video; you will be able to create a new Logger and describe how the Rails.logger method is used.
-
Examining Server-generated JavaScript
After watching this video; you will be able to describe how server-generated JavaScript works with Rails.
-
Examining Singular Resource Routes
After watching this video; you will be able to recall that there is also a singular form of resource routing.
-
Connecting with Java
After watching this video; you will be able to use Rjb to connect Ruby with Java.
-
Controlling Mass-Assignment Attributes
After watching this video; you will be able to protect against attacks by controlling mass-assignment attributes.
-
Create a Scaffold and Routes
After watching this video; you will be able to generate a basic scaffold and create shallow routes.
-
Create Tests for a User Model
After watching this video; you will be able to create tests for a user model.
-
Creating Active Jobs
After watching this video; you will be able to use Sidekiq to create an ActiveJob.
-
Creating an API Application
After watching this video; you will be able to create an API application.
-
Creating Custom Rake Tasks
After watching this video; you will be able to create custom rake tasks.
-
Creating Migrations
After watching this video; you will be able to create and sequence a migration.
-
Creating Nested Resources
After watching this video; you will be able to recall how to create nested resource routes.
-
Creating Search Forms with Ransack
After watching this video; you will be able to create search forms with Ransack.
-
Creating Static Pages
After watching this video; you will be able to describe how to create static pages.
-
Customizing Error Pages
After watching this video; you will be able to customize error pages.
-
Customizing the Mailer
After watching this video; you will be able to customize the mailer.
-
Customizing Validators for Apipie
After watching this video; you will be able to customize validators for Apipie.
-
Debugging Rails Applications
After watching this video; you will be able to use different tools to debug Rails applications.
-
Defining Model Validation
After watching this video; you will be able to compare model validation with foreign_key constraints.
-
Examining the Asset Pipeline
After watching this video; you will be able to describe how the asset pipeline looks for assets to include.
-
Examining the routes.rb File
After watching this video; you will be able to describe what the routes.rb file is and how it is used.
-
Examining the Scaffold
After watching this video; you will be able to describe the scaffold.
-
Executing Raw SQL Queries
After watching this video; you will be able to execute a raw SQL query .
-
Exploring Default Controller Member Actions
After watching this video; you will be able to describe the member actions SHOW; EDIT; UPDATE; and DESTROY.
-
Exploring Default Controller Collection Actions
After watching this video; you will be able to describe the controller actions INDEX; NEW; and CREATE.
-
Exploring Flash Objects
After watching this video; you will be able to describe how Rails uses the flash object to display errors.
-
Exploring Gems
After watching this video; you will be able to describe how to use the bundler.
-
Exploring Migrations
After watching this video; you will be able to describe what migrations are and how they are used.
-
Exploring PostgreSQL Enhancements
After watching this video; you will be able to describe Hstore and how it is used.
-
Generating a Basic Scaffold
After watching this video; you will be able to generate a basic scaffold.
-
Generating a Mailer
After watching this video; you will be able to create and configure a mailer.
-
Generating an Access Token
After watching this video; you will be able to generate access tokens for authentication.
-
Generating Performance Tests
After watching this video; you will be able to generate performance tests.
-
Handling Exceptions in Active Job
After watching this video; you will be able to add exception handling on queues.
-
Implementing Collection Caching and Cache Keys
After watching this video; you will be able to implement collection caching and cache keys.
-
Implementing Elasticsearch
After watching this video; you will be able to implement elasticsearch.
-
Implementing Search
After watching this video; you will be able to put search on an API endpoint.
-
Installing Devise
After watching this video; you will be able to install Devise.
-
Installing Pundit
After watching this video; you will be able to install Pundit.
-
Introduction to ActiveRecord
After watching this video; you will be able to describe the basics of how ActiveRecord works.
-
Loading Associated Records of Objects
After watching this video; you will be able to load all the specified associations with the minimum number of queries.
-
Managing Active Job
After watching this video; you will be able to use Sidekiq to handle queue management of ActiveJobs.
-
Manipulating CSV Files
After watching this video; you will be able to manipulate CSV files.
-
Modeling Data with ActiveRecord
After watching this video; you will be able to use ActiveRecord to model data.
-
Performing Authentication with Devise
After watching this video; you will be able to perform authentication with Devise.
-
Performing Data Migrations
After watching this video; you will be able to recall how to perform and roll back a migration.
-
Performing Pagination with Kaminari
After watching this video; you will be able to use Kaminari for pagination.
-
Performing Unit Testing
After watching this video; you will be able to unit test models.
-
Persisting Data into Multiple Models
After watching this video; you will be able to persist data into multiple models.
-
Render JSON Manually
After watching this video; you will be able to render JSON manually.
-
Reusing Common Behavior with Modules
After watching this video; you will be able to recall how to use modules to share functionality between disparate model classes.
-
Setting Rails for Internationalization
After watching this video; you will be able to set up Rails for Internationalization.
-
Setting Up Apipie Gem
After watching this video; you will be able to set up the Apipie gem.
-
Setting Up the Rails Environment
After watching this video; you will be able to set up the Rails environment.
-
Skipping Validations
After watching this video; you will be able to recall what methods do not invoke validations.
-
Streaming Content
After watching this video; you will be able to use the ActionController::Live module.
-
Testing Helpers
After watching this video; you will be able to test helpers.
-
Testing Integrations
After watching this video; you will be able to test integrations.
-
Testing Mailers
After watching this video; you will be able to test mailers.
-
Testing Rails APIs
After watching this video; you will be able to use Rack::Test to test HTTP response codes.
-
Testing Validations
After watching this video; you will be able to test validations.
-
Testing Views
After watching this video; you will be able to test views.
-
Using Action Callbacks
After watching this video; you will be able to use action callbacks.
-
Using Active Model
After watching this video; you will be able to use active model.
-
Using Advanced Associations
After watching this video; you will be able to use the :through association.
-
Using Authorization within Access Tokens
After watching this video; you will be able to use the authenticate_or_request_with_http_token method.
-
Using Basic Associations
After watching this video; you will be able to use has_one; has_many; and belongs_to associations.
-
Using CDNs
After watching this video; you will be able to use CDNs to improve performance.
-
Using Conditional Callbacks
After watching this video; you will be able to use conditional callbacks.
-
Using Conditional Validation
After watching this video; you will be able to use conditional validation.
-
Using CsrfHelper
After watching this video; you will be able to use CsrfHelper to output meta tags with the name of the Cross-Site Request Forgery protection parameter and token.
-
Using Custom Validators in Classes
After watching this video; you will be able to use custom validators in classes.
-
Using Fragment Caching
After watching this video; you will be able to use fragment caching.
-
Using Guard
After watching this video; you will be able to use Guard to automatically run tests.
-
Using Mailer Views and Templates
After watching this video; you will be able to use mailer views and templates.
-
Using Matchers with RSpec
After watching this video; you will be able to use matchers to work with classes that implement module Enumerable.
-
Using Other Finder Methods
After watching this video; you will be able to use different finder methods to retrieve objects from the database.
-
Using Polymorphic has_many Relationships
After watching this video; you will be able to make one class belongs_to more than one type of another class.
-
Using Postman
After watching this video; you will be able to use Postman to test results.
-
Using Rails View Helper
After watching this video; you will be able to use TagHelper to generate HTML tags programmatically.
-
Using RDoc
After watching this video; you will be able to use RDoc for documentation.
-
Using Rendering and Layouts
After watching this video; you will be able to use rendering and layouts.
-
Using respond_to
After watching this video; you will be able to use respond_to to render JSON and XML.
-
Using RSpec Mocks and Stubs
After watching this video; you will be able to use Rspec mocking and stubbing facilities.
-
Using Russian Doll Caching
After watching this video; you will be able to use Russian doll caching.
-
Using Scopes
After watching this video; you will be able to define and chain query criteria.
-
Using Scopes with Lambda
After watching this video; you will be able to chain scopes with lambdas.
-
Using seeds.rb
After watching this video; you will be able to recall how edits to this file are done.
-
Using Select and Pluck
After watching this video; you will be able to compare the .select and .pluck methods.
-
Using shared_examples
After watching this video; you will be able to use shared_examples.
-
Using Transaction Callbacks
After watching this video; you will be able to use transaction callbacks.
-
Using Turbolinks
After watching this video; you will be able to use Turbolinks to attach a click handler to all links of an HTML page.
-
Using UrlHelper
After watching this video; you will be able to use URL helper to make links and get URLs that depend on the routing subsystem.
-
Using Variants
After watching this video; you will be able to use variants to render different templates based on some criteria.
-
Using VCR
After watching this video; you will be able to use VCR to record HTTP integrations.
-
Using Virtual Attributes
After watching this video; you will be able to use virtual attributes.
-
Working with Custom Helpers
After watching this video; you will be able to write custom helpers.
-
Using Custom Validators in Models
After watching this video; you will be able to use custom validators in models.
-
Using Factory Girl
After watching this video; you will be able to use factory girl.
-
Using Formatting View Helpers
After watching this video; you will be able to use formatting view helpers.
-
Using FormHelper
After watching this video; you will be able to use FormHelper to provide a set of methods for working with HTML forms.
-
Using Where Clauses and Find Methods
After watching this video; you will be able to use .where and .find.
-
Working with ActiveRecords Errors
After watching this video; you will be able to compare using the errors[] with the invalid? method.
-
Working with Log Directories
After watching this video; you will be able to work with log directories.
-
Working with Partials
After watching this video; you will be able to use partials to break up the render process into modular chunks.
-
Working with Rails Initializers
After watching this video; you will be able to create initializers inside of gems.
-
Working with Rails Views and Sessions
After watching this video; you will be able to .
-
Writing Tests for Active Jobs
After watching this video; you will be able to write tests for active jobs.
-
Creating Shallow Routes
After watching this video; you will be able to recall how to create shallow resource routes.
-
Adding Data Using Seeds
In Ruby on Rails; you can preload data into your database using a seed file. In this video; Mike McMillan uses the seeds.rb file to enter data and automatically load that data into a database.
-
Asset Pipeline
Ruby on Rails provides developers with a feature known as an asset pipeline for storing resources; such as stylesheets; JavaScript files; and images. In this video; Mike McMillan demonstrates the asset pipeline location and structure; and how to precompile assets so that they can be delivered quickly and efficiently in compressed form over the Internet.
-
Cookies
Ruby on Rails allows developers to store data on a client's browser using cookies. In this video; Mike McMillan demonstrates how to set cookies in a new application and use key value pairs to retrieve user information.
-
Creating a Class
In Ruby on Rails; you can easily create a whole new class object. In this video; Mike McMillan demonstrates how to define a class; initialize an object; and return its state.
-
Creating an ActiveRecord Model
You can create an ActiveRecord model and then migrate it into Ruby on Rails. In this video; Mike McMillan uses the rails generate model command to create a model that will be migrated into Rails.
-
Creating Class Access Methods
In Ruby on Rails; you can control access to class data. In this video; Mike McMillan demonstrates how to use getters and setters to retrieve and change class data.
-
Examining and Modifying Views
Views are automatically created when you start a new Ruby on Rails project; and display Rails' application data in an HTML format. In this video; Mike McMillan demonstrates the various views that are created when starting a new Rails project.
-
Examining Routes
In Ruby on Rails; when you generate scaffolding; routes are created. In this video; Mike McMillan uses the musics table to examine the routes that were created during scaffolding.
-
Examining the Controller
When creating a Ruby on Rails project; Rails automatically generates a template which can be modified to suit your needs. In this video; Mike McMillan demonstrates a stock Rails template and how to edit it.
-
Installing Ruby and Rails
Ruby on Rails contains special installers for when you want to do an installation on Windows. In this video; Mike McMillan demonstrates the procedure to install Ruby and Rails in a Windows environment.
-
irb and the Command Line
In Ruby on Rails; you can write; edit; and run programs using the IRB shell or the command line. In this video; Mike McMillan uses the IRB shell to input code; read it; evaluate it; and print the result of the evaluation.
-
Loops – While and Until
In Ruby; the While and Until loops let you execute or iterate the same block of code while or until a certain condition is true. In this video; Mike McMillan demonstrates the purpose and logic of Ruby's While and Until loops; creates examples of each and; using a loop control variable; compiles and runs each one in the Ruby shell.
-
Reworking the Home Page
Ruby on Rails provides developers with the ability to customise the default home page generated when a new application is created. In this video; Mike McMillan demonstrates how to generate a new controller with a controller name and index for the home page; then specify the route.
-
Ruby versus .NET
The Ruby language differs from .NET languages such as C#. In this video; Mike McMillan demonstrates how Ruby's simple syntax; RubyGems package manager; the interaction of a text editor and command-line controller; inbuilt testing methods; dynamic typing; and ease of learning give Ruby distinct advantages over .NET languages such as C#.
-
Sessions
Ruby on Rails provides .NET developers the ability to model state on the stateless web. In this video; Mike McMillan uses a web session to demonstrate how to implement the set_breadcrumbs to check for existing breadcrumbs and create an array; and how to control the display using the breadcrumbs.count and shift methods.
-
Setting Up a Rails Project
It's easy to set up a Ruby on Rails project. In this video; Mike McMillan uses the BitNami RubyStack command prompt window to set up a new Rails project.
-
Simple Input and Output
Ruby uses simple methods to allow you to enter data into; or output data from; programs. In this video; Mike McMillan demonstrates how to launch the Ruby shell and explains how to use the gets method and Integer and Float conversion functions to enter data; and how to use the print and puts methods to extract data from a program.
-
Strings and Substitutions
Ruby allows you to use the substitution and global substitution methods to modify the values of strings. In this video; Mike McMillan demonstrates how to use the sub method and to substitute a variable's value with a regular expression; before using the gsub method and specific arguments in regular expressions to amend the values of multiple sub strings.
-
View Templates
When creating a Ruby on Rails project; Rails automatically generates a template which can be modified to suit your needs. In this video; Mike McMillan demonstrates a stock Rails template and how to edit it.
-
Why Ruby
Ruby is a dynamic; interpreted; object-oriented language known for its easy syntax and powerful features that allow for fast; easy development. In this video; Mike McMillan demonstrates how; although Ruby offers similar benefits to more conventional languages; its dynamic typing; modern programming-language features; RubyGems package-management system; multi-platform capabilities; and large web-programming library set it apart from other languages.
-
Working with Inheritance
In Ruby on Rails; you can create multiple inheritance on a class. In this video; Mike McMillan demonstrates how to create multiple inheritance using a super class that inherits parameter values from a child class.
-
Commenting a Ruby Application
After watching this video; you will be able to comment and document code.
-
Creating a Simple Ruby Application
After watching this video; you will be able to create a Ruby source file and execute it with the Ruby interpreter.
-
Creating and Using Simple Variables
After watching this video; you will be able to declare and work with simple variables.
-
Defining and Using Constants
After watching this video; you will be able to use and recognize constants in Ruby.
-
Getting Input from the Console
After watching this video; you will be able to get input from the console using gets and chomp.
-
Installing Ruby
After watching this video; you will be able to install Ruby on Linux; Windows; and MacOS X.
-
Running a Ruby Script
After watching this video; you will be able to create and run a Ruby script from the command line.
-
Using Ruby Interactively via IRB
After watching this video; you will be able to use the Interactive Ruby (IRB) prompt from the command line and execute Ruby statements.
-
Using Ruby Objects
After watching this video; you will be able to describe how everything in Ruby is an object.
-
Writing Output to the Console
After watching this video; you will be able to output strings and numbers to the console via the p; printf; putc; puts; and print methods.
-
Multi-Valued Dimensions – Creating
Ruby on Rails can be used to create a table for multi-valued dimensions. In this video; Mike McMillan demonstrates how to create a set of tables; set up a relationship between two of the tables; and create a bridge table to contain the data.
-
Multi-Valued Dimensions – Querying
Ruby on Rails allows you to perform a number of functions including template rendering; web server information gathering; and working with databases. In this video; Mike McMillan demonstrates how to write queries for data stored as multi-valued dimensions within databases.
-
Nil versus Empty String
Ruby on Rails can differentiate between nil; where an object doesn't exist; and an empty string; where the object exists; and its value is the actual empty string. In this video; Mike McMillan demonstrates the difference between an empty string and a nil value using the Rails console.
-
Not Nil Database Migration
Ruby on Rails provides database developers with the ability to create a not_null database migration. In this video; Mike McMillan demonstrates how to add a rule to each field in a migration file so when migration is performed; none of those fields can contain a null value.
-
One-to-One Relationships
In Ruby on Rails; a has_one association allows you to create a logical one-to-one relationship between two models in a database where one record is only ever associated with exactly one other record. In this video; Mike McMillan demonstrates how to establish a one-to-one relationship between two Active Record models.
-
Optimistic Locking Intro
When working with databases in Ruby on Rails; Active Record provides the optimistic locking mechanism that allows multiple users to access the same record for editing at the same time; producing an exception if a conflict occurs. In this video; Mike McMillan demonstrates the process that needs to be followed when implementing optimistic locking in a Rails application.
-
Optimistic Locking Recap
In Ruby on Rails; you can use Optimistic Locking to limit multiple users making changes to the same database file at the same time. In this video; Mike McMillan reviews why you would need Optimistic Locking and how you would enable it.
-
Optimistic Locking with ActiveRecord
You can use Ruby on Rails to activate Optimistic Locking in an ActiveRecord model when working with databases. In this video; Mike McMillan demonstrates how to activate Optimistic Locking in an application by using a lock_version field.
-
Pessimistic Locking
In Ruby on Rails; you can set up Pessimistic Locking to lock a page or record as soon as the locking is requested. In this video; Mike McMillan demonstrates three different ways to implement Pessimistic Locking in a database.
-
Pessimistic Locking Intro
When working with databases in Ruby on Rails; Active Record provides the pessimistic locking mechanism that locks a database record once it is accessed allowing only one user to have control of any piece of data at one time. In this video; Mike McMillan demonstrates the pessimistic locking process and the different types of pessimistic locks available.
-
Pessimistic Locking Recap
In Ruby on Rails; the uses for Pessimistic Locking differ from Optimistic Locking in a number of ways. In this video; Mike McMillan recaps how to implement Pessimistic Locking; and explains how it differs from Optimistic Locking.
-
Polymorphic Associations
In Ruby on Rails; Active Record polymorphic associations provide you with the ability to create relationships in your database where models can belong to more than one other model on a single association. In this video; Mike McMillan demonstrates how to set up a polymorphic association in Active Record by generating models; declaring the association; and modifying the migrate.
-
Querying a has_many Relationship
Ruby on Rails provides database developers with two methods of querying a has_many database relationship. In this video; Mike McMillan demonstrates how to use the joins keyword or the includes keyword to query two databases that have a has_many relationship.
-
Referential Integrity Tests
When utilizing Ruby on Rails; referential integrity is a database concept supported by Active Record that ensures the relationships between models remain constant and prevents users or applications from entering inconsistent data. In this video; Mike McMillan demonstrates the primary ways Active Record ensures that referential integrity is maintained in a Rails application.
-
Resolving Duplicates
When working with databases in Ruby on Rails; it's important to know how to identify and resolve duplicate data entries as efficiently as possible to avoid any potential problems. In this video; Mike McMillan demonstrates how to resolve duplication by writing a validation rule in the model; as well as by adding an index to the database.
-
Scan Locks
You can avoid scan locks when working with databases in Ruby on Rails. In this video; Mike McMillan demonstrates various tools and ways to avoid table scans and negate table locks.
-
Schema.rb and Foreigner Gem
In Ruby on Rails; the Foreigner gem adds new methods to your Rails migrations and dumps foreign keys to schema.rb; allowing you to manage foreign key constraints while working with databases. In this video; Mike McMillan demonstrates how to install the Foreigner gem and write rules to the migration so foreign keys are recognized and used.
-
Setting Up InnoDB
In Ruby on Rails; you can use the InnoDB engine to support transactions that the default MySQL storage engine otherwise doesn't support. In this video; Mike McMillan demonstrates how to set up the InnoDB engine and modify a Rails model when working with databases.
-
The Missing Parent
Ruby on Rails provides database developers with the ability to prevent missing parent database objects from occuring. In this video; Mike McMillan demonstrates how to use belongs_to; dependent; and destroy to ensure that no child objects remain when their related parents are deleted.
-
Using a Star Schema
Using Ruby on Rails you can use a Star schema for warehouse type queries in a database. In this video; Mike McMillan uses Rails to generate a controller then adds fields and joins to create the Star schema.
-
A Development Environment for Concurrency
When working with databases in Ruby on Rails you can deploy a Multi-threaded Rails application. In this video; Mike McMillan demonstrates ways to efficiently deploy multi-threaded applications on a multi-threaded server and a multi-process server.
-
ActiveRecord Validation
Ruby on Rails provides developers with the ability to add code to the ActiveRecord model to check data input. In this video; Mike McMillan demonstrates how to add validation rules to validate that data is entered correctly in a form; for example.
-
Acts as Lists
In Ruby on Rails; an acts_as_list statement allows you to represent a child table of objects as an ordered list. In this video; Mike McMillan demonstrates how to set up an acts_as_list statement so database records can perform as if they are in a list data structure.
-
Adding User Specific Menus
Using Ruby on Rails allows you to create menus that are not generated automatically. In this video; Mike McMillan uses HTML with Rails link_to to create a simple menu.
-
Basic CRUD
Ruby on Rails provides developers with database development tools that can be used to build basic create; read; update; and destroy (CRUD) functionality. In this video; Mike McMillan demonstrates how to create MySQL databases for a Rails application; generate and define a table; and populate the table in a browser.
-
Calendar Tables
Ruby on Rails can be used to create a calendar table. In this video; Mike McMillan uses Rails to build a Calendar table with multiple fields; and uses code to insert data into the table.
-
Cascading Deletes
When working with databases in Ruby on Rails; cascading deletes ensure that whenever a record is deleted; any dependent records in an associated table will also be deleted. In this video; Mike McMillan demonstrates how to write a rule for cascading deletes within an Active Record model where a has_many association has been established.
-
Columnar Databases
In Ruby on Rails; you can store data in a columnar database model instead of as a relational MySQL database. In this video; Mike McMillan demonstrates how a columnar database differs from a relational database; and how it is structured.
-
Concurrency and Foreign Keys
Ruby on Rails allows you to index foreign keys in order to avoid high concurrency degradation. In this video; Mike McMillan demonstrates how to index a database variable as a foreign key.
-
Concurrency and Unique Constraints
In Ruby on Rails; you can use unique key constraints for columns where duplicate values are not allowed. In this video; Mike McMillan demonstrates how to create a unique key constraint and then have the model validate it with a couple of simple commands.
-
Concurrent Requests
In Ruby on Rails; you can work with concurrent requests in databases. In this video; Mike McMillan demonstrates the various aspects of working with concurrent requests including fine tuning your application to improve the efficiency of your application when working with concurrency.
-
Counters
In Ruby on Rails; you can use counters to track changes to a record in a database. In this video; Mike McMillan demonstrates how the internal counter works with Optimistic Locking.
-
Creating a has_many Relationship
In Ruby on Rails; you're able to link one database to multiple other tables using a has_many relationship. In this video; Mike McMillan demonstrates how to create and test a has_many relationship.
-
Creating a Star Schema
In Ruby on Rails; a Star Schema can be created using Fact and Dimension tables to create and customize various models and tables. In this video; Mike McMillan explains how to set up a range of models through the use of a Star Schema.
-
DeadLocks
In Ruby on Rails; you can prevent deadlocks from occurring when multiple users try to access a record at the same time. In this video; Mike McMillan demonstrates how to troubleshoot deadlocks when working with InnoDB databases.
-
Duplicate Data
As with any other system; when working with databases in Ruby on Rails; it is best to avoid storing duplicate data as it occupies more space; requires additional maintenance; and can potentially lead to problems and cause confusion. In this video; Mike McMillan demonstrates the three main identifiable reasons duplicate data can sneak into a database.
-
Duplicate Data – Recap
Ruby on Rails allows you to avoid duplicate data when working with databases. In this video; Mike McMillan recaps how to avoid create duplicate data in a database by using the model declaration to enforce uniqueness.
-
Foreign Keys
When working with databases in Ruby on Rails; foreign keys that establish and enforce a link between models are automatically generated when you create Active Record associations. In this video; Mike McMillan demonstrates how to create a has_many association between two models; and also creates a foreign key and highlights how Rails establishes a foreign key in a belongs_to association.
-
Handling Invalid Data
In Ruby on Rails; there are several schemes for handling invalid data. In this video; Mike McMillan uses the Rails documentation and a series of examples to shoe how to use data validation to handle invalid data in a database.
-
InnoDB Locking
In Ruby on Rails; you can use the InnoDB engine to perform record locking. In this video; Mike McMillan demonstrates how to work with InnoDB locking in Rails using a transaction and a controller.
-
Introduction to Star Schemas
In Ruby on Rails; you can create data warehouse applications using a Star Schema that use Fact and Dimension tables from which specific information can be extracted according to the data required. In this video; Mike McMillan demonstrates the uses of Star Schemas and explains an example showing Fact and Dimension tables.
-
Networking
Ruby provides support for all the major networking protocols and contains a library of networking protocols; such as HTTP; FTP; POP; and TCP. In this video; Mike McMillan demonstrates how to work with the HTTP protocol by writing a program that opens up a web page and displays basic information about the page.
-
Arrays
In Ruby; the array is a flexible data structure which allows you to combine data of multiple types in an ordered list. In this video; Mike McMillan demonstrates how to create integer; string; and mixed arrays in Ruby; and how to access the elements in the array.
-
Testing Controllers
After watching this video; you will be able to write functional controller tests.
-
Hashes
Ruby allows you to use the hash data structure to store data as key-value pairs. In this video; Mike McMillan demonstrates how to use the Ruby Shell to create a hash; and use the key and value methods to retrieve your data; before computing the average of the hash's values.
-
Handling Exceptions
Ruby; which includes a structured system for handling errors; allows you to raise and catch exceptions using the begin/rescue clause or statement. In this video; Mike McMillan demonstrates how to make provision for possible exceptions in a begin clause and to handle them in a rescue clause in which responses to the expected exceptions are also specified.
-
Instance Methods
Ruby instance methods allow the user to interface with a class object. In this video; Mike McMillan demonstrates the syntax and operators applicable to instance methods; creates and codes an instance method for a class object using Ruby; and compiles and runs his program in the Ruby shell.
-
Regular Expressions
In Ruby; you can use a wide range of regular expressions. In this video; Mike McMillan demonstrates how to use various regular expressions to match patterns and for text processing.
-
Inheritance
Ruby allows inheritance by letting a class inherit the instance variables and methods from a super class. In this video; Mike McMillan demonstrates how to allow a class to inherit from a super class; how to redefine or override the inherited class's methods; and create several objects; before running his program.
-
Using Versioning
After watching this video; you will be able to use versioning.
-
Running Tests
After watching this video; you will be able to run tests.
-
Operators
Ruby has a full set of operators for performing a variety of expressions. In this video; Mike McMillan demonstrates some of the frequently-used operators which are found within Ruby.
-
Working with Sessions
After watching this video; you will be able to use the session hash to store and access data.
-
Editing Records
Ruby on Rails provides different ways of editing database records that are much easier than using equivalent SQL statements. In this video; Mike McMillan demonstrates how to perform a simple edit by finding a record; changing its attribute and saving it; and how to use the Rails update_attributes method to edit a record and save it automatically to the database.
-
Handling Exceptions
In Ruby; you can easily handle exceptions by creating begin blocks that catch the exception and allow you to fix the problem. In this video; Mike McMillan demonstrates how exceptions can be generated; and how to create blocks to handle the exceptions.
-
Creating a Project
Once Ruby on Rails is installed; you can easily create a new project by running a simple command that will generate the foundation of a fresh Rails application. In this video; Mike McMillan uses the rails new command in Command Prompt to create a new project; before starting the web server and opening the Rails default information page.
-
Creating an Instance
In Ruby; an instance method is a method called on an instance of a class that you define just like any other method. In this video; Mike McMillan demonstrates how to define an instance method in a Ruby program and how to reference instance variables before calling the instance method using a method call operator.
-
Methods
Ruby methods or functions are named packages of small programs that perform a single task. In this video; Mike McMillan demonstrates how to create; name; and define Ruby void and value-returning methods; before creating an interactive program; the methods of which return a value to the calling program.
-
Private Methods
In Ruby; you can use the private keyword to define a method that is inaccessible to a class's public interface. In this video; Mike McMillan demonstrates the purpose of private methods and the use of the private keyword to create a method hidden from the public interface of its class.
-
Working with Arrays
In Ruby; you can use zero-based arrays; instantiated with the new method; to hold multiple elements and objects of any data type. In this video; Mike McMillan demonstrates the syntax of Ruby arrays; how to use the each iterator and puts method to output their sum; and shows you how to mix and match data types within arrays.
-
If Statements
In Ruby on Rails; If statements are formed in a slightly different manner. In this video; Mike McMillan demonstrates how to build various If statements; such as ifels and ifelsif; using the command-line version of Ruby.
-
Initialization
In Ruby; you can instantiate objects of a class type. The objects of a class type are called class objects. In this video; Mike McMillan demonstrates how to create different kinds of initializers for different kinds of objects of one class type.
-
If Statements
Ruby allows you to use the if statement as your primary construct for programmatic decision-making. In this video; Mike McMillan uses the if; if...else; and if...elsif statements and their corresponding conditions; relations; and expressions to enable Ruby to evaluate programs in the Command Line.
-
Rendering JSON with active_model_serializers
When Developing Web APIs in Ruby on Rails; you can use active model serializers to help render JSON. In this video; Jay Wengrow demonstrates how to install active model serializers and how they work.
-
Symbols
With the attribute reader method; users can create symbols within classes in Ruby. This allows users to create instance variables and assign data to fields created. In this video; Mike McMillan demonstrates how to create and use symbols within Ruby.
-
Comments
Ruby supports two types of comments. In this video; Mike McMillan demonstrates how to create single-line and multiline comments in Ruby.
-
Data Modeling
Ruby on Rails supplies developers with the ability to create various data models. In this video; Mike McMillan demonstrates how to implement a one-to-many; many-to-many; and a one-to-one association between tables in a database.