background preloader

ROR

Facebook Twitter

Ruby on Rails helpful sites.

[Engineering Lunch Series] Step-by-Step Guide to Building Your First Ruby Gem - Quick Left. Building your first Ruby gem may seem like a daunting task, but it's actually not so bad.

[Engineering Lunch Series] Step-by-Step Guide to Building Your First Ruby Gem - Quick Left

It's quite rewarding to not only release a gem, but to see its download count climb as others put your hard work to good use, and even still as others offer to contribute new features and bug fixes to your very own gem. And thanks to RubyGems.org and Bundler, the process of creating, releasing, and implementing gems couldn't be easier. After reading through this post, get access to the 45 minute video tutorial complete with slide deck and instruction from Matt in our new Engineering Lunch series. Be a QLer for the day and see what we're teaching our engineers in our semi-monthly engineering lunch series. Sorry, we don't buy the lunch but you do get the tutorial for free! A gem is essentially a Ruby plugin.

The concept of Ruby plugins actually predates the concept and implementation of Ruby gems. Ruby gems makes life much, much easier. . $ gem install bundler $ bundle gem dogeify. Dinner Dash - Jumpstart Lab Curriculum. A gem for every occasion: 11 great Rails libraries we use on every project — Infinum. Here are some of the core gems that have a special place in all of our Gemfiles.

A gem for every occasion: 11 great Rails libraries we use on every project — Infinum

Some of them help with debugging code, others provide certain functionality like authentication. That's useful in almost any project. In the end, they all help us work faster and produce quality software. 1. better_errors Standard Rails error page offers valuable information, but it's static, so you can't check what actually went wrong - besides the stack trace. 2. devise Whether you need simple HTTP authentication, or you're looking for some complex Facebook and Google+ login system, this authentication solution is great and it will significantly speed up your work. Class User < ActiveRecord::Base devise :database_authenticatable, :registerable, :confirmable, :recoverable, stretches: 20end 3. cancancan The successor of the abandoned cancan project, this authorization gem lets you define what a user can do on your website by using abilities defined in a single place. 4. delayed_job 5. letter_opener.

Riding Rails. List of Rails Status Code Symbols - Bill Says... What is a Gemfile. Ruby developers use Gemfiles all the time, and most of us know how to do the basics.

What is a Gemfile

All Rails db Rake Tasks and What They Do. I sometimes get confused between the different db rake tasks – what is the difference between db:setup and db:reset, for example?

All Rails db Rake Tasks and What They Do

So to clear up some of my confusion – and maybe some of yours – I have compiled this list of tasks with explanations. db:create Creates the database for the current RAILS_ENV environment. If RAILS_ENV is not specified it defaults to the development and test databases. Db:create:all Creates the database for all environments. Db:drop Drops the database for the current RAILS_ENV environment. Singly Linked List - My Bread. Tl;dr Basic components and methods of a linked listTesting singly linked list implementationProgramming a singly linked list using RubyComplete code can be view on github Components.

Singly Linked List - My Bread

Design Patterns: Law of Demeter with Rails — SPACELAB TEAM. Design Patterns: Law of Demeter with Rails Developing better Rails applications Being a good rails developer is not just to know some basic stuff like creating model, controller and migration.

Design Patterns: Law of Demeter with Rails — SPACELAB TEAM

Almost every project tends to become more complicated and that’s why it’s necessary to know design patterns to avoid complication of code and time waste while refactoring. Five Active Record Features You Should Be Using · A Year of Commits. 15 Nov 2015 Active Record is responsible for communicating with the persistence layer by default in Ruby on Rails applications.

Five Active Record Features You Should Be Using · A Year of Commits

Using Active Record effectively and efficiently can greatly improve an application's code. Buckblog: Little Things: Refactoring with Hashes. 14 November 2015 — The author presents a simple refactoring from case statement to hash table, as an ode to Ruby's "little things" — 2-minute read Ruby owes its popularity to an abundance of “little things”–small touches in just the right places that make all of its features come together in delightful ways.

Buckblog: Little Things: Refactoring with Hashes

One of those little things, for me, is the humble Hash class. Hashes are one of the most versatile data structures in Ruby. I’ve written about them before, regarding their interchangability with Proc objects, but there’s so much more they can do. I was recently doing a code review and encountered a pattern where user input was being used to derive a class to instantiate. I have no doubt that many of you reading this will take one look at that code and think of half a dozen ways in which it might be refactored. Looking at the code, my first impression was that the case statement was merely selecting a different class based on the value of the user input. Right? Win, win, and win! Five Active Record Features You Should Be Using · A Year of Commits. Rubular: a Ruby regular expression editor and tester. Ruby on Rails Guides. Ruby on Rails Cheat Sheet by DaveChild. Rails Beginner Cheat Sheet.

Bold words are what is really important e.g. the command and concept shown in the usage category.

Rails Beginner Cheat Sheet

In the code usage and example columns these highlight the main part of the concept, like this: general_stuff.concept. In the same columns italic_words mark the arguments/parameters of a command/method. However italic words in the descriptions or general text denote more general concepts or concepts explained elsewhere in this cheat sheet or in general. The console (also called command line, command prompt or terminal) is just another way of interacting with your computer. So you can basically do anything with it that you could also do with your graphical desktop user interface.

For the different operating systems starting the console differs. Windows: Open the start menu and search for command prompt. Ruby is the programming language Ruby on Rails is written in. Ruby on Rails Power!: The Comprehensive Guide - Aneesha Bakharia. Live Webinar: Refactoring Rails Applications with RubyMine. Ruby on Rails Screencasts. Rails Girls. RailsBridge. Rails Girls DC (Vienna, VA) Find a Rails Girls Study Group.