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.
Trailblazer + Devise: Integrating Devise validatable model with Trailblazer operation
In this blog post I cover integrating Devise validatable model with Trailblazer approach. See how you can propagate your Devise model errors into Trailblazer based forms. Trailblazer + Devise: Integrating Devise validatable model with Trailblazer operation
Ruby (on Rails) ecosystem bittersweet or "we like to hate PHP"
http://stdout.in/en/post/ruby-ecosystem-bittersweet-or-we-like-to-hate-php [more inside]
How to Escape
Escaping gsub’s back-ref enabled replacement strings can be hard sometimes.
You have mastered double-quoted string escapes when you know which byte "\C-\M-A" refers to.
Currency Exchange Rates Gem
BankExchangeRubyAPI is the Ruby API client for the BankExchange service. It provides (historical) exchange rates from central banks from around the world for free.
Why is Rails Preferred among Start-ups?
Well, if you are a company looking to build an application with a fast deployment, Ruby on Rails is a great choice as it combines both speed and efficiency in one package. Check out why Rails is the first choice when it comes to start-ups.
Rails 5 adds OR support in Active Record
The most requested feature in Rails 5. [more inside]
Ruby Refinements
Refinements is a way to limit the scope of a monkey patched class. [more inside]
Using scopes with associations in Rails
Scopes in our models help to DRY up code. In this article, I explore how to use scopes that reference associations.
Add notes to you DB migrations
Have you ever been in a situation where you have to deploy some code and forgot what special things you had to execute manually afterwards? The gem activerecord-migration_notes helps you remember these things at the time you create them instead of searching through PR’s, mail, etc and delay the deploy
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