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.
Using ES2015 with Asset Pipeline on Ruby on Rails
Want to know how to use the latest JavaScript version without messing up with Node.js, NPM, builders and all the complexity that comes with that? This article shows you how you can integrate Babel.js with Asset Pipeline.
Magic Comments and DATA Constants
Two more odd constructs in Ruby: Magic comments for special interpreter instructions and data sections, which can also read the file’s own source code.
TimeMath2 -- small library for easy time arithmetics
TimeMath2 is a small, no-dependencies, no-monkeypatching library attempting to make time arithmetics easier. Allows to floor/ceil Time or DateTime to any unit (from second to year), increase/decrease by any unit and so on, up to the generation of time sequences.
Drape - Reincarnation of Draper for Rails 5
Drape - it’s a little bit rewritten and adapted version of Draper for Ruby on Rails 5 only. Much has been done, but much more needs to be done. Community I need your support to complete this.
tty-command - Kick that bash habit
tty-command runs external commands and it’ll halt automatically if a command fails. It’s easy to get verbose or quiet output as appropriate, or even capture output and parse it with Ruby. It provides man options such as dry run mode for inspecting commands without actually executing them or timeout to ensure that commands don’t hung indefinitely. Escaping arguments is a breeze. These are all areas where traditional shell scripts tend to fall flat.
Ruby operators: equality, comparison, pattern matching and ordering
Ever struggled with equality operators in Ruby? Check out the latest post at the Zen Ruby blog: Ruby operators: equality, comparison, pattern matching and ordering.
Rails associations are awesome and poisonous at the same time
One of the biggest problems that I see in older and more complex Rails applications is that every subdomain is intertwined in the code. Your application does a lot and you would like to start splitting it into more independent modules. But you can’t. Because other parts look directly into the data (tables and columns in db) of other modules. They are coupled on DB and ActiveRecord layer. [more inside]
Solidus eCommerce: Cleaning Up the Product Show Page
In this episode we fix a bug from the previous episode. We then move on to cleaning up the product show page. We divided the page into 3 columns using twitter bootstrap’s grid system.
Rails 5 Features and Changes
Rails 5 will only work on Ruby 2.2.1 and above. The following features are the reasons for using ruby 2 or higher. Get a Detailed Look at Rails 5 Features
Awesome kramdown - A collection of kramdown goodies for the markdown converter
Hello, To celebrate local hero Thomas Leitner and the great markdown converter made with ♥ in Vienna I’ve put together a bookmark collection in the awesome tradition called (surprise!) awesome-kramdown. Did you know? You can’t use kramdown not only on GitHub Pages (w/ Jekyll) but also for building rfc2629 documents, man pages or Facebook Instant Articles. Anything missing? Let us know. Cheers.
Arguments for Included Modules in Ruby
Learn how to configure an included module using arguments instead of callbacks in this quick article.
How Rails handles status codes
If you are curious how Rails enables you to render status: :ok and how it handles exceptions to return proper HTTP status codes, you should check out my latest article.
Understanding Agile Software Development
The agile process weaves software development seamlessly to fit the model with its weekly sprints, stand-ups, planning, and feedback. Read about Agile Software Development
RailsConf 2016 - Build Realtime Apps with Ruby & Pakyow By Bryan Powell
Building Realtime Apps with Ruby & Pakyow Client-side frameworks dominate the conversation about the future of web apps. Where does that leave us Ruby developers? Let’s explore a way to build realtime apps driven by a traditional backend, without writing a single line of JavaScript! You’ll walk away with a new way to build modern, realtime apps employing client-side patterns.
Always Include Two!
Quick Ruby quiz question: What is the difference between Ruby’s two ASCII encodings? Second question: What is the difference between Ruby’s two implementations of strftime()?
What Makes Brakeman Special
A quick blog post about what I think has made Brakeman (the static analysis security tool for Rails) special and successful.
The Straight Dope on Deprecations
Richard Schneeman peels back the seemingly simple veneer of deprecations, and we will learn when and how to use deprecations effectively.
Know Ruby: with_index
Have you ever used with_index? Not each_with_index which is similar but slightly different. Did you know that you can do map.with_index? Read More
How to change primary key column size(type) using Rails migration with MySQL?
It is really painful. Rails doesn’t support it out of the box. [more inside]
Just released convertkit-ruby, what add-on will you build?
Do you use Convertkit for email marketing and need a feature that’s not available yet? It’s now easier to build private integrations for Convertkit using your favorite Ruby web framework with convertkit-ruby.
Method chaining and lazy evaluation for HTTP-APIs
The latest update of LHS, an ActiveRecord-like library to use with HTTP-APIs, includes method chaining and lazy evaluation. Since version 5.4.0, LHS provides chainable scopes and where queries, it also accepts pagination methods and request based options as part of the query-chains. https://github.com/local-ch/lhs
Trailblazer Newsletter May 2016
The May 2016 newsletter discusses Cells 4.1, how it simplifies layouts and makes ActionView redundant, TRB and Hanami’s increasing gravity and what’s been happening in the Ruby community this month.