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.
Sass, haml, and coffeescript with Jekyll
A short article about using preprocessors with jekyll using ruby scripts instead of plugins so the static page can be hosted on Github Pages.
Sorting an ActiveRecord relation by PostgreSQL hstore value with Arel
A short article about sorting relations by an hstore value on the database level, using Arel.
Rails Helper Methods
The 411 on Helper Methods and their usage. http://6ftdan.com/allyourdev/2015/01/28/rails-helper-methods/
NoteShred Ruby Gem Available
NoteShred is a service to send and receive encrypted, password protected notes that automatically shred after reading, and now it has it’s own Ruby gem [more inside]
Using Interactors to organise business logic
I was introduced to using Interactors to extract business logics out of the controller and organise it using Interactors according to tasks. I have grown fond of this pattern a lot as it explicitly shows what tasks are required to be executed when an action in a controller is requested. I have decided to write a post on what I have learnt about using Interactors
Pronto v0.4.0 released: GitLab support and more
Pronto performs quick automated code reviews with the help of various analysis tools (RuboCop, Brakeman, Flay, etc.) by checking only the introduced changes. As of v0.4.0, it added support for GitLab and some other neat features. Enjoy!
Non-Message Flash in Rails
Rails developers love using the flash hash for displaying messages to users, but that’s not all it can do! Learn what other tricks Rails’ flash has up its sleeve.
Mastering Ruby Blocks in Less Than 5 Minutes
Blocks are one of the most powerful and often overlooked feature of ruby. I must confess that it took me a while to figure out how ruby blocks work and how they can be useful in practice. [more inside]
How to upgrade to Rails 4.2
Upgrading some Rails apps is as easy as bundle update rails. But what if you have one of the other kind of apps? The ones that are still on Rails 4.0, or even 3.2, because you didn’t feel like dragging them kicking and screaming into the future? Whether you’re facing a quick upgrade or a painful one, these steps will help you get your app to Rails 4.2 as smoothly as possible.
Get Rid of Your Admin Gem
On my RubyJunky blog I’ve written the first of what will be a series describing what troubles me about the current popular Rails admin gems and how to easily craft your own better admin interface.
The All New RubyFlow for 2015
RubyFlow began with this post from April 2008 as a way for people to submit links to me for Ruby Inside. It quickly became more than that, though, and has kept me informed for Ruby Weekly even while Ruby Inside has quietly died. [more inside]
Jekyll Quick Reference (Cheat Sheet) for Static Site Generator
I’ve started with a Jekyll Quick Reference (Cheat Sheet) for the static site generator - sections so far include: folder structure (_posts folder, _drafts folder, etc.), global variables, site variables, page variables, Liquid template filters n tags (standard and Jekyll extras), and more. It’s a single-page (8 pages printed) hosted at the Planet Jekyll GitHub repo. Cheers. Update (Jul/15): Link updated/fixed.
Video encoding processor for CarrierWave
As previously promised, here are some more tips how to tackle with video processing. Streamio FFMPEG has a bunch of useful options. You can specify for example frame rate, resolution, bitrate, codecs and many other by simply passing an options hash to transcoding. This time I wanted to change the previous code a little bit, add some options and include latest rails goodies as ActiveJob and Enumerable. Let’s get started!
Preview: Simple CLI for managing your Rails VPS or cloud server
Intercity CLI will help you set up hosting for your Rails apps on a VPS. This article shows a preview of how you can set up your Rails VPS in four commands.
Security for Lotus v0.3.0
Markup auto-escape, Content-Security-Policy, X-Frame-Options, HttpOnly cookies by default: read the proposals.
Implementing Ruby's Collect Method
Ruby’s collect method is one that I use all the time. In fact, mastering the Enumerable module will help out your Ruby code like no other. I wanted to see what it would be like to implement Ruby’s collect method.
Incisive Ruby Substitutions - The gsub Hash Syntax
How do you perform multiple Ruby substitutions simultaneously? [more inside]
Command Line Reporter 3.3.5 Released
Bug fix release regarding border colors and vertical spacing. Check out the wiki to see examples of nicely formatted tables. As always the gem is available on rubygems.org with source on github. For those not familiar with “the reporter”, it provides a ruby DSL for writing reports with built in features for progress reporting and table formatting. It is very handy for system level and data reporting scripts.
Resilient Networking: Planning for Failure
A successful application is one that is resilient to fluctuations in network availability and performance: it can take advantage of the peak performance, but it plans for and continues to work when conditions degrade. Thoughts and tips on how to build such a thing.
Rapp - A Ruby Gem for scaffolding CLI or Daemonizable Ruby apps
I went looking a little while back for something fitting this description, and didn’t find anything that really worked for me. So, I wrote my own: Rapp [more inside]
Timeago date filter for Liquid templates!
Jekyll-timeago is a Liquid extension to compute and display distance of dates in words. It allows localization and integrates easily with Jekyll. You can use it via a filter or via tag:
Upload base64 encoded data to carrierwave uploaders.
If you develop some API, that interact with mobile devises, then this small gem might be handy: [more inside]
Panthro: The RubyGems Proxy Cache
Hi, I’ve developed Panthro, a POC of a rubygems proxy cache - it’s a very simple rack app that caches gem files in your local filsystem. [more inside]
Alternative to CanCan: ActionAccess
Action Access is a very lightweight and straightforward access control system for Rails. It boils down to this: [more inside]
Rails Fundamentals: Introducing the belongs_to Assocation (14+ minute video)
Active Record associations are an incredibly powerful feature yet configuring them can be confusing to Rails newcomers. In this free 14+ minute excerpt of the Easy Rails Active Record Video Associations series I’ll introduce the belongs_to association, complete with a detailed code example. Watch the video.