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.
A brief tour of Nokogiri Decorators
Jacob Rothstein published a nice piece on how Nokogiri decorators work and how they’re used by Loofah, a library that sanitizes HTML and other formats.
EOTS now allows HTML in labels and captions!
EOTS (Email Of The Species), the gem for easily declaring your email types and their fields, is now at version 0.0.2, and now allows HTML in labels and captions. (Just be aware, these should therefore be hardcoded in an initializer, never using stored user input!) Rubygems info is at https://rubygems.org/gems/eots , code is at https://github.com/davearonson/eots , and a site that uses it (mine) at http://www.Codosaur.us (but please don’t send me emails just to test it).
Is Ruby 2.3 Faster? Immutable (Frozen) String Literals Performance
I took one of my Rails apps and enabled immutable string literals (the experimental feature in Ruby 2.3 that is going to be the default in 3.0). Read on to find out how that changed its performance: http://ruby-performance-book.com/blog/2016/02/is-ruby-2-3-faster-frozen-string-literals-performance.html
Elixir Pipe Operator for Ruby: Chainable Methods
There has been discussions of how to have something like Elixir’s awesome Pipe Operator in Ruby. So this is my attempt at a small, simple solution that might be useful: Chainable Methods.
Yet Another Faat Update!
HI, guys! I updated my gem-generator Faat! With the help of the community, I decided to remove such entities as Resources and leave for logic Services. Here is article!
Spree 3.0.6.1 released
This Spree release contains numerous fixes backported from 3.1.0.beta. We’d like to thank all the contributors who made this happen. [more inside]
Testing Mixins in Isolation with Minitest and RSpec
Learn how to make sure your mixins work properly by testing them in isolation with Minitest and RSpec. Read more here.
Ruby Asia Newsletter
Ruby news, articles and interesting links from Asia delivered to your inbox once every two weeks. Curated with care by @winstonyw, organiser of RedDotRubyConf in Singapore.
Clojure's iterate in Ruby
Ruby doesn’t have sequences like Clojure… or does it? In this post, we look at emulating the Clojure function iterate with Ruby Enumerator for fun. https://rossta.net/blog/clojure-iterate-in-ruby.html
Active Support Improvements in Rails 5
Rails 5 introduces number of new methods in Rails 5 [more inside]
Rails 5 improves searching for routes with advanced options
Rails 5 brings additional options for rake routes task to display specific routes. [more inside]
Ruby Threads and ActiveRecord Connections
Unlike independent processes, all Ruby Threads within the same process share memory, enabling each individual Thread to consume or process objects and elements from the same data store. A problem occurs with ActiveRecord connection consumption when using these Threads.
Exploring MRI Source Code
Ever wanted to pry under the hood and see how Ruby works? http://www.blackbytes.info/2016/02/exploring-mri/
5 Tips to Speed up your Website
Improve perfomace of website is big story. Today, I’ll share with you 5 tips to speed up your website. Read more: http://goo.gl/SN9k6M
How to speed up Ruby on Rails updates using PostgreSQL
Learn how to speed up migrations and make your updates atomic with these simple PostgreSQL optimizations for your next RoR project.
Envforcing environment variable requirements
Envforcer is a Ruby gem that enforces environment variable requirements in Rails applications. http://blog.mojotech.com/envforcing-environment-variable-requirements/
One Week of Remote Working: The Good & The Bad
Everyone read DHH’s book on the subject, but we never made a concerted effort to adopt remote culture until last week, and we’ve written about what we learned here: https://www.madetech.com/blog/one-week-of-remote-working-the-good-and-the-bad
Comparing Rails and Phoenix
I’ve tried to create a thorough and fair comparison of Rails and Phoenix. We’ll talk about where they are similar and where the differ, providing examples all along the way. In Part 1 we’ll mostly talk about getting started, routing, and app architecture. In Part 2 we’ll dive into the Model, View, and Controller.
Which Ruby background job framework is right for you?
Just like there is no single programming language that can solve everyone’s problem, there is no single ‘right’ job framework. Here’s a comparison of Sidekiq, Delayed::Job, and Suckerpunch.
How to teach React.js properly? A quick preview of wroc_love.rb workshop agenda
In this short blogpost I describe and analyze what makes React.js hard for beginners and how to overcome it. The conclusion is applied to create a workshop agenda. I’d love to invite you to a workshop - if you happen to be in Wrocław, it’s free!
Produce PHP-style multidimensional array in Ruby, e.g arr[1][2][3] = 'foobar'
I had to reproduce multidimensional PHP array behaviour in ruby. Here is the result: [more inside]
New Ruby on Rails 5.0 Book
I published my new Ruby on Rails 5.0 book on Amazon. It covers all the normal Rails stuff plus the new 5.0 goodies Action Cable and Active Job. The Ruby beginner’s chapter has been updated to Ruby 2.3. [more inside]
Build Books w/ Gutenberg - a Web Typography Starter Kit - and Jekyll
Hello, I’ve put together a static site theme that lets you build books w/ Gutenberg - a web typography starter kit by Matej Latin. The theme uses the Sass source version and gets auto-build using the GitHub Pages service. See the live example - “Strange Case of Dr. Jekyll and Mr. Hyde” by Robert Louis Stevenson or the source repo. Happy Jekylling. Cheers.