The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Choosing my editor for Ruby on Rails
When it’s time to choose an editor for Ruby on Rails, you will find a variety of good options. From the most austere to a true beast. I have been trying out the most known editors and wrote some notes that I want to share.
Rails 5 Basics : Running the Server
I am updating the Rails 4.2 Quickly book to Rails 5. If you would like to read it online, checkout the first chapter from Rails 5 Quickly Rails 5 Basics : Running the Server
Making controller logic easier to test, by removing it from the controller
The gem can be found here:
It’s inspired by trailblazer, but sticks more to how rails is laid out.
To use the default functionality, for each of your actions, you can just
do:
render json: model
or however you want to render the response.
model is a memoized method
that looks up an operation and policy and applies whatever custom logic you want to implement.
Checkout the readme for details. Read more
Testing Rails Background Workers
The addition of Active Job to Rails gave developers a single, unified interface for a number of popular background processing frameworks including Sidekiq, Resque, and Delayed Job. In this post, we’ll look at a step-by-step process for testing your workers from top to bottom using Active Job and Minitest.
Getting Started with Minitest
Just published a tutorial for SemaphoreCI’s community on using Minitest in your Ruby projects with TDD. Check it out here.
How to speed up querying for autocomplete field with Rails and MongoDB
In a project I am working on I have an autocomplete input field on a form which searches in a database of about 200000 documents of potential customers. Read my findings about how to speed up searching
Resque Gem : For Background Processes In ROR
Resque creates background jobs using Redis. Since it supports multiple queue, we can place them on multiple queues and process them later as well. And it comes with an administration interface for monitoring and managing the queues. Read full article on RailsCarma<?a> Blog.
Is it nil?
This is an article about what happens in Ruby when you ask something if it is nil. A look at the underlying Ruby source code to see what makes the nil? method tick. Hint: OOP and Inheritance.
How to Write Future-proof Mocks in RSpec 3
Tests are an important component in most software applications. Whether tests drive the development, or are bootstrapped on after the fact, tests need to be reliable for future development to progress. An application’s complexity rises with time. During and after this increase, ensuring that a test suite makes the right assertions and mocks in an intelligent and sturdy way is crucial.
JSON API Apps With Lotus
Do you need a fast and lightweight JSON API app? It must be powerful, flexible, quick to develop and easy to deploy? Here’s a tutorial that shows how to build it with Lotus. It will take you 15 minutes, deploy included.
Static Site Generator of the Year 2015 - Middleman or Jekyll?
Hello, For today’s Vienna.html (static site) meetup I’ve prepared a talk titled “The World’s Greatest (Free) Static Site Builders / Generators”. Browse the slides (use space to flip through) or the all-in-one page source. What your favorite static site builder / generator? Jekyll? Middleman? Nanoc? Any other? Vote for Year 2015 Award on Twitter. Cheers.
First beta of ROM 1.0.0 has been released
Check out the official announcement.
Peeking Under The Hood of ActionController Parameters, Part 2
It’s really easy to forget how much of Rails is abstracted away into a black box. Simple things like strong parameters or how a controller’s action’s handle the request-response cycle can seem magical — until we look at what’s actually going on under the hood. This blog post looks at how ActionController::Parameters isn’t just as simple as a Ruby Hash, and explores where parameters get set in ActionController::Metal.
How Linters Can Help You Ship Code Faster
Linters as a tool to become better developer - write cleaner code and adapt to every style guide quickly Read more
Union Station Feature highlight: Weekly Summary
Union Station’s weekly summary is an email service to keep your team up to date on the current status of your application. The summary contains statistics on throughput, performance, deployments, and system load, read more about it on our blog!
Inspecting Method Parameters in Ruby 2.2.3
Learn how to inspect method parameters in Ruby 2.2.3.
Rails Asset Pipeline Simple Guide
This guide aim to provide really simple way to explain how asset pipeline work and how you can using it with your rails application. Read more
Rubycritic's newest team - Revamping code quality analysis
Hot News from Rubycritic! New team and version 2.0 and 2.1 release, check all the news:
Documenting an API by testing
Here is a blogpost about a way to document an API by testing used at TaskRabbit.
Building a Ruby on Rails app part 5: The front end
Here is the fifth and last instalment of Building a Ruby on Rails app series, where we show to develop the front end.
How to handle failure in Ruby on Rails
In my slides, I explain through a refactor how I handle failure and return meaningful errors to the end user.
Infinite Sequences in Ruby
How to use Ruby’s Enumerator to emulate infinite sequences from functional languages like Clojure.
How to Deploy All Day yet Deploy Nothing
I’ve wrote a new blog post where I explain how much issues I had when trying to deploy the most standard rails app possible to Elastic Beanstalk via Docker. Basically it’s a rant in why in the hell deployment 2015 isn’t as easy as making a blog with Rails was 10 years ago. Read here: How to Deploy All Day yet Deploy Nothing