RubyFlow The Ruby and Rails community linklog

×

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

You can use basic HTML markup (e.g. <a>) or Markdown.
Note that your post may be edited to suit the format of the site.

As you are not logged in, you will be
directed via GitHub to signup or sign in

Post Preview

Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.

How To Inherit Templates When Creating Custom Fields in Administrate

One of the biggest (and unexpected) pains for users of Administrate is that custom fields don’t inherit templates. Luckily there’s a solution using to_partial_path which works and requires a lot less effort than copy/pasting the original views. Read about it here http://www.carlosramireziii.com/how-to-inherit-templates-when-creating-custom-fields-in-administrate.html

Shared Libraries: How Ruby and C Work Together

If you take a look under the hood, you might be surprised at how much Ruby depends on C. MRI is written in C. Gems use C for performance. And much of Ruby’s standard library consists of Ruby wrappers for C libraries. In this article we’ll discover how this is possible by building our own small C library and using it in Ruby. http://www.rubyletter.com/blog/2017/03/03/using-shared-libraries-in-ruby.html

Rearmed-JS - Write your Javascript in a natural way like you write your Ruby code!

When your working with Javascript, do you ever get choked trying to do something that would have been a dead simple iteration or string method in Ruby but in JS it ends up being the most disgusting code ever. Well I just released my plugin Rearmed-JS that solves a large part of this problem. This library is a collection of helpful methods and monkey patches for Arrays, Objects, Numbers, and Strings that will make your Javascript natural feeling. Works in the browser and in NodeJS. https://github.com/westonganger/rearmed-js

Taming Complex Business Logic in Ruby

When faced with real life complexity there rarely is an easy way out or a silver bullet solution. Here I will describe the model I’ve come up with during years of trial and error. The solution presented here is as far as I know not a mainstream one and it could be considered somewhat controversial. http://kresimirbojcic.com/2017/01/26/taming-of-complex-business-logic.html

Also, check rails_workflow gem (https://goo.gl/Jem79Y) - it allows to configure…

HashID Obfuscated URLS in Rails

When I am building a Rails app that I expect to be public facing in some sort of capacity, I don’t want to be displaying auto-incrementing, integer based IDs in my URLs. Not only does it visually look better, in my opinion. It is a security enhancement by removing the predictability of record discovery via the URL. [more inside]

Loading older posts