RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
September 29, 2014
Presenters in Rails
When your models are bloated with methods that are only used in views, it might be a good time to refactor them. Moving that logic into helper modules might be OK in some cases, but as the complexity of your views grows, you might want to look at presenters. In this article, I will walk through how I refactored views to use presenters instead of helper methods. [Continue reading...]
Due to an unprecedented influx of sensitive data that is managed and collected on mobile devices, ITTIA is offering a state-of-the-art bidirectional synchronization solution for Android apps that enables big data collection on-the-go. ITTIA DB SQL communicates with ITTIA DB Sync, and uses a back-end RDBMS to store device data in existing tables and download updates specific to each device.
Green Ruby News #86
Green Ruby News #86 is out.
I just wrote a guide for adding a staging environment to Rails explain why and how to it set up: how to copy data from your production environment, how to deal with mails, the question to ask for...
September 28, 2014
finite_machine version 0.9.2 brings important fixes to transitions involving :any type state and thread safety.
I just released activerecord-time-scope, which provides sets of useful scopes for time-related columns.
Devise is considered the best-of-breed authentication solution for Rails apps. In this blog post, we go over how Devise is built on top of Warden, how to use it in a Rails app, and how to write tests for it.

How to use Devise in Rails for Authentication
September 27, 2014
Website screenshot server
I made this tiny gem because I couldn't find any solution for ad hoc ruby code reloading that would also work on Windows (e.g. shotgun and rerun use fork(), so they're unix-only). Hope you find it useful and let me know what you think!
September 26, 2014
Rails Disco tries to get the best bits of event sourcing integrated into a Ruby on Rails tool stack. The adds commands, events and projection and some Rails generators. I think it works very good. I seek for help to maintain this project. I believe in the idea, but lack the time to get this thing production ready. Every feedback and help is appreciated.
A blog post about how we at CookiesHQ used Google's geocoder to seed our database with journeys for testing geomatching using PostGIS.
I’m the newest Rails Support Engineer to join Ninefold and a big advocate of developer bootcamps. Her talk sounded like it would be perfect for where I am in my career.

An excellent point that Kate made was that you shouldn’t only rely on your senior developers to teach your junior ones. As the common saying goes, “you don’t know something until you teach it.” The last person who was taught should be doing the teaching. This will definitely cut down on the amount of cynicism that can interfere with the learning process.

Kate broke down the four phases of onboarding for a new developer:
Read about the 4 phases of onboarding a Junior dev.
September 25, 2014
A short, annotated blog post on how to use Passenger standalone in development with smooth integration of debugger and pry.
Brian Knapp shares some lessons learned from his landmark Ruby web framework benchmarking post. Really great post.
We just posted a complex Barcelona Ruby Conference (#Baruco) summary written by Phillip Boksz.
September 24, 2014
*nix have pipes, Elixir has pipes, Ruby deserves pipes! I just hacked this together yesterday and I'd love to get some feedback:

pipable("moo") | Reverse | Leet | Mooify | :downcase |'@pcreux') | { delete: 'o' }
# => cw said: 00m
Blog post announcing Hangar, the Rails plugin we made at Faraday to expose factories to our Protractor tests.
Harry's is open-sourcing Kontrast, an automated testing tool for comparing visual differences between two versions of a website.
Advanced gsub
Today I'm celebrating the two-year anniversary of RubyTapas today, and in honor of that I've freed up a short screencast about an advanced usage of String#gsub from the archives.
Want to get started with Docker for hosting your Rails apps? There are a lot of options out there. In this post I describe a start to deploy a Rails app with Docker.
Should my company choose RubyMotion or Swift?
We've been writing a few Swift apps at TFG. Here's a summary of our experience shifting from RubyMotion .
September 23, 2014
Use RSpec and JSON Schema to create a test-driven process in which changes to the structure of your JSON API drive the implementation of new features.
Can you learn Rails before learning Ruby? You can, for a little while. But if you want to learn enough Ruby to master Rails, study Ruby on its own. There are tons of Ruby books out there. I counted four shelves the last time I was in a bookstore. A lot of them are good. But there are a few that are in a class of their own. And they'll help you through the entire process of picking up Ruby.
Dancing drones, Gangam Style, Matz, sun and the nicest-looking presentation ever, in other words: Sunny Memories from the Barcelona Ruby Conference 2014 .
Do you find yourself too lazy to go to translation file to create a new translation entry? Are your views full of "I'll turn this in to a translation call later" literal strings?. Well, end to your woes is a click away. Check out the new version of Burek!
Here's a writeup on various ways to create Structs with some suggestions on improvements.
September 22, 2014
Writing detailed documentation helps to improve software design. Explaining the intent mitigates inconsistencies and helps other people to understand our initial idea.

We'll discover why the semantic of the raised exceptions is important to write solid API interfaces.

[Read the article]
Just cooked up a blog post about interaction with objects using first order functions: Click here to enjoy
We've scoured through the change notes to bring you some of the more interesting tidbits that are changing in Rails 4.2.
In previous part, we’ve set up an application with Neo4j and Rails and deployed it to Heroku. From here, we’re going to see the ways to declare relationships and write query in Neo4j.
September 21, 2014
TTY gem release v0.1.0
I've released tty gem that aids in developing beautiful command line clients. The library has been in development for a while and has ambitions goals for the future. Please check it out and let me know your thoughts. Finally please take a look at this lovingly crafted project page. Thanks!
Green Ruby News #85
Posted this week Green Ruby News 85 with a bunch of fresh links.
You probably know how to add authentication to a Rails app with a framework like Devise or OmniAuth, but don't let your understanding stops there. In our recent blog post, we talked about several ways to add authentication in a Rails app, and talk about their benefits and drawbacks. 

Rails Authentication Methods
September 20, 2014
How can you plug complex, multi-model SQL queries into ActiveRecord models so that you can use them in your views? ActiveRecord Eager Loading with Query Objects and Decorators.
September 19, 2014
Use fancy Postgres features like Common Table Expressions to calculate a duration in business hours in any time zone. Blogged here.
Store Schema v0.0.1
I've just released Store Schema. Enhances ActiveRecord::Base.store_accessor with data conversion capabilities.
Parelation v0.0.1
I've just released Parelation. It translates HTTP parameters to ActiveRecord queries.
I just wrote about splitting up the large Rails applications.
I just published a blog post about my take on splitting up Rails applications.
When was the build passing?
Sanemat had a short talk "When was the build passing?" at Travis CI Meetup in Tokyo, Sep 17, 2014. The build passing a year ago still keep build passing now? It is not assured! I talked this and showed one solution
Execution time is key to developing and deploying an app with ease. Here's a couple of basic hints to speed up your Rspec tests.
Execution time is key to developing and deploying an app with ease. Here's a couple of basic hints to speed up your Rspec tests.
The big announcement of RubyMotion's support for Android has finally reached public beta! Instead of creating my normal polished screencasts, I decided to got RAWRRRR!!! This is me playing around trying to get RubyMotion for Android set up, and at the end you can see me fighting with the Android emulator, showing exactly why I use a device for development, because it's faster and more stable. It's a bit longer than I would have liked, but if you're wondering about all the stuff you're doing with setting up, this is going to be the goto place to work that out. Eventually I'll update this as things change over time.
September 18, 2014
Godfrey Chan has written up a nice blog post of Day 1 at Ruby Kaigi. Have a read on what they've been talking about in Japan.
Ye Old Code Finder
Seek you to find olde code written by devs in the distant past? Seek ye no more, but instead employ ye Olde Code Finder.
Last nights slides from the linz.rb talk titled Building HTTP JSON APIs w/ Ruby (and Sinatra). Use left/right cursor keys (or space bar) to browse the slides. Or check the all-in-one-page markdown source. Cheers.
September 17, 2014
Certain tasks like updating dependencies or migrating a database must be done after pulling code or checking out a branch. Other tasks such as re-indexing our ctags improve our development experience. Both kinds of tasks are easy to forget to do and are therefore error-prone. To address the problem, we’ve recently added a standard, extensible set of git hooks to our dotfiles in order to automate necessary, but annoying tasks.

Never forget again!
I wrote a post on how to integrate Angular and Rails and how this mix can even improve code readability
Rake Tasks Best Practices
One of the guys at the office asked me. What things should I keep in mind when writing a rake task and how do I know if my rake task is well written. I decided to make a list of what I think are good practices and here it's the result.

Everything You Always Wanted to Know About Writing Good Rake Tasks * But Were Afraid to Ask
Download Sinatra Cookbook now
Today I am announcing the first 8 chapters of Sinatra Cookbook, and to celebrate here's 15% off for you all.