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.
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 [more inside]
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. [more inside]
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: http://bit.ly/1MGNNpN
Documenting an API by testing
Here is a blogpost about a way to document an API by testing used at TaskRabbit. http://tech.taskrabbit.com/blog/2015/11/21/tests-doc/
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. http://slides.com/apneadiving/handling-error-in-ruby-rails/fullscreen
Infinite Sequences in Ruby
How to use Ruby’s Enumerator to emulate infinite sequences from functional languages like Clojure. https://rossta.net/blog/infinite-sequences-in-ruby.html
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
Testing async ActionMailer jobs with ActiveJob in Minitest
If you send mails via ActiveJob and use Minitest, here’s a bit of code that helps you test it: https://www.krautcomputing.com/blog/2015/11/22/testing-async-actionmailer-jobs-with-activejob-in-minitest/
Administrate Gem Added to Rails Composer
The nice new Administrate gem from Thoughtbot is now an option in Rails Composer when you build a starter application. Chris Oliver shows what the gem can do in a GoRails screencast.
Three Ways to Redefine a Private Method
Learn the different ways to redefine a private method and evaluate the impact of each approach.
Create maintainable queries in Ruby with query object and criterias
Leaving query logic in a single class lead to god objects hard to maintain, I explain a maintainable alternative with query objects and criterias http://teotti.com/create-maintainable-mongodb-queries-in-ruby-with-query-object-and-mongoid-criterias/ The examples use mongodb but can be implemented with Active Record too.
Minitest-ok 0.1.0
Minitest-ok 0.1.0 released. Using Minitest::Ok, you can write: [more inside]
Understanding Rack Middleware
Rack middleware is a simple and yet powerful way to plug custom reusable code into not just Rails but virtually any Ruby web application. But wrapping your head around Rack middleware and the way it works can be a daunting task at first. Let’s write some plain ruby to better grasp what’s going on behind the scenes.
Basics of Protected Methods in Ruby 2.2.3
Learn the Basics of Protected Methods in Ruby 2.2.3 using simple examples.
sermepa_web_tpv gem updated to new hmac 256 signature
I’ve just released a new update of the Spanish payment gateway sermepa_web_tpv. It implements the new signature system based on hmac 256
Rack::TestApp, intuitive testing helper for Rack
Rack::TestApp 1.0.0 released. It is intuitive helper library to test Rack application. See README for details.
Method transplanting in Ruby
Method transplanting is an elegant solution to keeping classes clean. This solution will work perfectly when a transplanted method has no dependencies on other methods from the original module considering unbound/bound do not track them. [more inside]
Architecting Rails Apps as Microservices
Monolith or Microservices? Designing your Rails app to work well with Microservices involves providing clear interfaces across the different boundaries of functionality in your app. Once the boundaries have been defined, how do you communicate across them? HTTP, queues? What if a service is down? These are some of the topics I cover in this article.
The Class That Never Ends: A Ruby Horror Story
Here is a controller file from the Ruby Central CFP app. You may observe that the class definition ended too early due to a honest rebase mistake. However, everything is still working correctly, and tests are passing. Can you tell why?
Implement Futures in Ruby
Benjamin Tan Wei Hao wrote an article on how to implement futures in Ruby. It’s really good and teaches a bit about concurrency, etc.
Separate model logic from view
In this post i describe why i think it’s good to separate model logic from view. https://masa331.github.io/2015/11/16/hide-complexnes-from-view.html