
Build a time tracking app in Ruby on Rails, covering models, associations, validations, forms, authentication, data export (CSV, XML, or JSON), and testing.
Trace the origins of Ruby on Rails, the open source web framework built on Ruby that popularized the model view controller paradigm, convention over configuration, and don't repeat yourself.
Explore how Rails powers a local blog app with Ruby basics, models, controllers, views, routing, asset pipeline, and console, including email on comments.
Explore the model view controller paradigm in Rails, using Active Record for database interactions, validations, associations, and foreign key relationships.
Explore installing Rails using the cloud-based Nitrous environment to create a Rails project, explore the app structure, and run a server with cross-device access and easy deployment.
Install Ruby and Rails with an all-in-one installer for PC or Mac. Verify with Rails -v and Ruby -v, and use the command line to run generators and rake tasks.
Access the course working files by downloading, extracting, and copying them to your desktop, then open and save changes from the player or disk on Windows or Mac.
Take a brief walk through a small rails blog app’s front end, showing posts, categories, and Ajax comments; login enables posting, with read more links for details.
Explore the Rails directory structure from gem file to assets, models, controllers, views, mailers, helpers, and config, including routes, database.yml, sqlite3, and tests.
Explore model and database features in a Rails blog app, set up fixtures, use sqlite3 in development, load fixtures, and start the Rails server to browse posts and comments.
Explore the model elements of a Rails blog app, examining posts, users, and comments, their validations, has many and belongs to relationships, and observe database queries on a local server.
Discover how controllers and views connect Rails models to the browser, using routing and resources for posts, categories, and comments, with the show action and layouts.
Master Ruby syntax and how to run Ruby code, from IRB to running Ruby files. Explore variables, print and puts, comments, strings, and core Ruby methods including mutating exclamation forms.
Define and instantiate a simple class in Ruby to model a quadrilateral, then demonstrate inheritance with square and trapezoid, and examine methods like number_sides and sides_parallel.
Explore Ruby classes and objects by building a Person class with instance attributes (f_name, l_name, age), an initialize constructor, to_s, and class variables and methods for shared data.
Explore the self keyword in Ruby, extending the built-in String class with is_all_uppercase? and using bang methods to mutate objects, plus comparing two strings to identify the same person.
Define a book class with title, author, and price, implement a constructor and a to_s method, and define an expensive? method to mark books over 20 dollars.
Explore strings in Ruby for Rails apps, focusing on double vs single quotes, escape sequences, interpolation, and essential methods like upcase, downcase, capitalize, size, count, and reverse.
Explore Ruby's numeric types, including fixnum, big numbers, and floats, and learn how integer and decimal division, modulus, and methods like odd?, even?, abs, rounding, numerator, and denominator work.
Practice implementing Ruby string and numerics exercises by building a palindrome checker, counting vowels case-insensitively, and reducing fractions using gcd in Ruby's integer class.
Explore arrays in Ruby as ordered collections indexed from zero, using square brackets, negative indices, and ranges to access, modify, and return elements in practical examples, including array literals.
Discover how hashes differ from arrays and use curly braces syntax for key-value pairs. Learn accessing, updating, and passing hashes to methods and constructors, including default values and ternary operator.
Explore Ruby control structures by evaluating if and case statements and practicing while, until, and times loops with practical examples.
Explore Ruby collection iteration with arrays and hashes using each, map, find, and find_all, including bang versions, conditionals, and practical examples for Rails data handling.
Practice three Ruby exercises on arrays and hashes: compute min and max without iteration, filter products by cost with find_all, and map numbers to twice plus five.
Explore Ruby blocks and yield through iterators like each and times, with examples of passing blocks to methods and printing results, including the Fibonacci sequence.
Explore iterators and blocks in Ruby by reviewing two exercises: a repeat method that yields a block twice, and implementing a my_find method using yield over arrays.
Create a new Rails app and explore its initial structure. Install gems via the gem file and bundle install to enable pagination and devise-based user authentication.
Generate a company model and its migration to create a companies table with a name field and timestamps for time tracker app. Run migrations with rake migrate to apply changes.
create models for company, user, project, and work with migrations that add name fields, first and last names, and foreign keys like company_id to establish belongs-to relationships, then migrate.
Learn to create model associations in Rails, using has_many and belongs_to with foreign keys, enabling queries like a company's users or a post's comments.
Learn to implement many-to-many associations in Rails by using has_many through with a join table (works) to relate users and projects and track work data.
Explore many-to-many associations between users and projects through works and time records. Use the Rails console to query has many through relationships, listing each user’s or project’s related works.
Use the Rails console to add data and test associations among companies, users, projects, and work items by creating records and validating relationships.
Explore yaml fixtures to seed and reload test data for a rails time tracker app, defining posts, users, and companies with embedded ruby for dynamic timestamps, loaded via rake db:fixtures:load.
Generate a Rails migration to change the hours field in the works table from decimal to integer, run the migration, and update the schema accordingly.
Review how fixtures work in Ruby on Rails by using embedded Ruby loops to generate multiple work items, assign them to users and projects, and load with rake fixtures:load.
Master the active record query interface to filter data, order results, and use where and find_by in Rails with SQL injection protection.
Learn to define reusable Rails scopes on models to filter data, such as hours >= 8 or recent items, using a concise syntax and the ActiveRecord query interface.
Rails ties validations to the model to guard data before saving, offering error reporting and examples like presence, integer, and greater-than-zero validations.
Apply Rails validations to a time tracker app by enforcing name lengths, presence of associations, numeric ranges for rate and hours, and a custom date validation that prevents future dates.
Builds the web framework by creating controllers and views and defines resourceful routes for actions like index, show, new, create, edit, update, and delete.
Learn how Rails routing directs requests through the routing table to the correct controller actions using resource routes, and how the params hash passes id to show actions and views.
Explore retrieving model data in controller actions using Active Record, render index and show views, and create links with routing and view helpers like link_to.
Generate controllers for projects and works, add index and show actions and corresponding templates, define resourceful routes, and run Rails server to test at localhost:3000.
Add a default home route and a named route to Rails, routing to the companies index and the works index action, and introduce a recent days method for dynamic queries.
Generate a migration to add a slug to projects and validate its presence and uniqueness. Route by slug to the show action for cleaner urls.
Explore the Rails action view layer by building on models and controllers to render layouts, using the application layout, yield, partials, and helpers, with formats like HTML, JavaScript, and JSON.
Edit the global layout to improve visuals with a responsive viewport tag, header, section, article, aside, and footer, and learn how yield renders views from the companies index.
Build maintainable navigation in a Rails app using link_to and a controller-based active class, then refactor into view helpers and a nav items data structure.
Learn how Rails asset pipeline concatenates and minimizes JavaScript and CSS for production, supports preprocessors like Sass and CoffeeScript, and organizes assets with manifests.
Style the global template using turbolinks and implement a reset and normalize.css. Apply responsive design with a 690px media query and set header, navigation, and footer background colors.
Explore how Rails routes a request to the first matching route, dispatches to the corresponding controller action, and renders html, text, xml, or json responses via views or direct output.
Loop over collections in views to list projects, companies, and workers with links to each show page. Use index actions, unordered lists or tables, and associations to connect related records.
Define a to_s method on Rails models to print readable strings in views, enabling simple link_to outputs for projects, works, and users with consistent name, company, and date time formats.
Modify the index views to display projects, companies, and works in tables, linking to show pages and showing user, project, date time performed, and hours with a view link.
Display related items on the show view by reusing the project index to present related work items, including who did the work, when, and hours, with links to each item.
Explore how to reuse view code in Rails by using partials and content_for to render contextual sidebars in layouts, with practical examples across index and show pages.
Extract partials to reuse common view code and render them with a collection for iteration. Apply the same partial in index and show pages for easier maintenance.
Refactor Rails views by extracting partials for works, projects, and companies, and render them on index and show pages using a collection parameter.
Explore how Rails forms enable user interaction by creating new posts in a blog through a form_for interface, posting to posts#create, and validating inputs before redirecting or re-rendering with errors.
Set up a create form for the companies model using Rails form helpers and form_for, connecting to a new company object in the new action with a name field.
Learn to build and style a Rails form for creating a new company using resourceful routing, form helpers, labels, text fields, and select boxes.
Implement a create form for projects by adding a new action and view, building a form_for @project with name, slug, default_rate, and a collection_select for the company from all companies.
Learn how to handle form submissions in Ruby on Rails by creating a new company, permitting parameters, saving, redirecting to the show page, and displaying flash notices.
Learn to implement the create action for works in Rails by handling form submissions, setting mass-assignment permitted fields, flashing notices, and redirecting to the work's show page, with layout integration.
Review how the create action in the projects controller handles new submissions, permits name, slug, company_id, and default_rate, saves the project, redirects to show, and handles validation errors.
This lesson adds a minimum five-character name validation for new companies and updates the create action to render the new form on failure, showing validation errors.
Learn how to validate work items in Rails by enforcing project and user presence, nonzero hours, and robust create action handling with error messages and form re-rendering.
Review how to implement and test validations for projects in Rails, including slug, company_id, and default_rate, and render errors with user-friendly messaging.
Learn to build an edit form in Rails that pre-populates fields, maps to the update action, and mirrors create flow with strong parameters and basic validations.
Add an edit feature for works in Rails by refactoring into a form partial with new and edit templates and a dynamic create or update button label.
refactor rails forms by extracting a shared _form partial for projects and companies, reuse it in new and edit actions, and adapt the submit button for create or update.
Learn to implement ajax forms in rails to submit work items from a project show page without page reload, using remote: true, respond_to, and js templates for dynamic updates.
Add the devise authentication package to your Rails app to require login and guard routes with before_action filters, using current_user and user_signed_in helpers.
Install devise in the time tracker application and add an email field to the users. Generate devise for the user model, adjust migrations, and review updated schema and flash notices.
Learn to implement devise-based authentication in Rails by building a login status message in the application helper, displaying sign in and sign out links, and protecting controllers with before_action authenticate_user.
Explore Rails mailers with actions and views, create a user association on projects via migration, and send owner notifications when a work item is logged.
Create a Ruby on Rails user mailer and configure SMTP settings to send a work created email whenever a new work item saves, with both HTML and text templates.
Learn to implement a Rails project update email: add a project updated email action and templates, trigger it in the projects update action, and extend forms with a user dropdown.
Learn how to upload files to a Rails server with a file field, process the upload in the controller, and save to public/uploads, with export to Excel.
Learn to wire a file upload into the works model by adding a doc field, saving the filename, and showing a link when a document exists.
Export project data to csv on the fly by handling csv format requests in a rails app and sending csv data as an attachment. Leverage a model method and Rails csv facilities to generate rows from project attributes using column names, and stream the file as a text/csv attachment.
Review enhances CSV export of projects by using associations to output company and owner names, adds the most recent work item, and customizes headers for clarity.
This Ruby on Rails tutorial from Infinite Skills will take you through the key features of this open-source web development framework while leading you through the development of a time-tracking web application. This course is designed for users that already have a working knowledge of the Ruby programming language.
You will start with a tour of Ruby Syntax and how to run Ruby code, learning about objects and classes, strings and numerics, and control structures in Ruby. You will then begin to create a Rails app, covering topics such as domain modeling, controllers, views, creating forms, and authentication. This video tutorial will also teach you how to use Ajax with Rails, handle file uploads, send emails from the server, and export content to CSV, JSON, and XML. Finally, you will learn how to test Rail apps and write model and controller tests.
By the completion of this computer based training course, you will be fully capable of creating a web app from start to finish with Ruby on Rails. Working files are included, allowing you to follow along with the author throughout the lessons.