(858) 586 7777 | About | Testimonials | Contact
vteams vteams vteams vteams
  • How does it work?
    • Startup Process
    • Your First Day
  • Technologies
    • Hire PHP Developer
    • Hire App Developer
    • Hire JavaScript Developer
    • Hire ROR Developer
    • Hire IOS Developer
    • Hire .NET Developer
    • Hire AI Developer
    • Hire Robotics Engineer
  • Sample Budgets
  • Meet The Team
  • Experiments
  • Captain’s Log
  • Blog
vteams vteams
  • How does it work?
    • Startup Process
    • Your First Day
  • Technologies
    • Hire PHP Developer
    • Hire App Developer
    • Hire JavaScript Developer
    • Hire ROR Developer
    • Hire IOS Developer
    • Hire .NET Developer
    • Hire AI Developer
    • Hire Robotics Engineer
  • Sample Budgets
  • Meet The Team
  • Experiments
  • Captain’s Log
  • Blog
Blog
  1. vteams
  2. Blog
  3. New Features and Major Changes in Rails 5
Jan 21
vteams- blog

New Features and Major Changes in Rails 5

  • January 21, 2016

ActionCable

ActionCable is a library that will ship with Ruby on Rails 5. It integrates WebSockets with the rest of your Rails application that facilitates you to push live updates to your client. This will make it easy to add real-time features to a Ruby on Rails application.

This library runs in a separate process from the main application server and needs a multi-threaded web server like Puma or Thin. Therefore, Puma is added as a default web server in Ruby on Rails 5.

ApplicationRecord

In earlier versions of Ruby on Rails, all models were inherited from ActiveRecord::Base. But now starting from Ruby on Rails 5, all models will be inherited from ApplicationRecord. Its class will be used for customization and extensions needed for an application, instead of monkeypatching ActiveRecord::Base.

By monkeypatching ActiveRecord::Base, the extra functionality is added to all models. On the other hand, if you want to include an extra functionality to ApplicationRecord then it will be localized to the models inheriting from ApplicationRecord.

Rails API

Rails 5 allows you to generate API-only applications. The rails-api gem has been merged to rails gem that allows you to generate API-only application and strip out all extra middleware.

ActiveRecord::Base#has_secure_token

Rails 5 have introduced another very useful feature for generating a random token. If you need a random token in your model, you can use ActiveRecord::Base#has_secure_token which handles this process.

Attributes API

Your models will get a new attribute class method in Rails 5 that allows you to easily define a relationship between the model and a non-Active Record type. No more misusing is serialized!

ActiveRecord::Base#where.or

With Rails 5, ActiveRecord::Base#where.or has been introduced. You can now perform SQL “or” operation with Rails way as:

1
Post.where('id = 1').or(Post.where('id = 2'))

  • Facebook
  • Twitter
  • Tumblr
  • Pinterest
  • Google+
  • LinkedIn
  • E-Mail

Comments are closed.

SEARCH BLOG

Categories

  • Blog (492)
  • Captain's Log (1)
  • Closure Reports (45)
  • Experiments (7)
  • How-To (57)
  • Implementation Notes (148)
  • Learn More (158)
  • LMS (8)
  • Look Inside (10)
  • Operations Log (12)
  • Programmer Notes (20)
  • R&D (14)
  • Rescue Log (4)
  • Testimonials (25)
  • Uncategorized (4)

RECENT STORIES

  • Ultimate Django: Become a Skilled Developer in 5 minutes
  • Create your 1st workflow with GitHub Actions within 5 Minutes
  • GitHub Actions- Automate your software workflows with excellence
  • Yii Framework – Accomplish Repetitive & Iterative Projects with Ease
  • A Recipe for CRM Software Development

ARCHIVES

In Short

With the vteams model, you bypass the middleman and hire your own offshore engineers - they work exclusively for you. You pay a reasonable monthly wage and get the job done without hassles, re-negotiations, feature counts or budget overruns.

Goals for 2020

  • Open development center in Australia
  • Complete and Launch the Robot
  • Structural changes to better address Clients' needs

Contact Us

Address: NEXTWERK INC.
6790 Embarcadero Ln, Ste 100,
Carlsbad, CA 92011, USA

Tel: (858) 586 7777
Email: fahad@nextwerk.com
Web: www.vteams.com

© 2020 vteams. All Rights Reserved.

Content Protection by DMCA.com