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.
Easy way to get IDs from social network links. IDs, please
I’ve released v1.0.0 of IDs, please. Get social network IDs or screen names from links to social network accounts.
Uplink Latency of WiFi and 4G Networks
WiFi makes no latency promises; 4G incurs scheduling costs but offers more stable performance. To minimize latency, don’t trickle data!
On Documentation-Driven Development 📝
Popular development approaches don’t emphasize the design process. You may be familiar with the concepts of test-driven development and behavior-driven development, but let’s talk about the lesser-known concept of documentation-driven development.
Local Notifications in RubyMotion - Keep your users engaged
By using local notifications you can remind your users about your application, notify them with reminders, and use the notifications for all kinds of creative ways of enhancing the user experience and engagement with your application. In this episode we round off the functionality of our Tasker application by implementing local notifications to remind them of due tasks. [more inside]
mongoid-observers for mongoid 4.0
Because this gem doesn’t exist and I need to use it very often. Therefore, I extract the code from mongoid on my own. It’s basically the same code from mongoid before it’s removed. Try it out, https://github.com/chamnap/mongoid-observers.
Never use ActiveRecord persistence methods in Rails controllers
Rails controllers are a mess. There’s one relatively simple practice I’ve adopted that helps improve their code significantly: Never use ActiveRecord persistence methods in Rails controllers, and never, ever use ActiveRecord filters.
Don't just dump code into your models
A few years ago there used to be a motto saying Skinny controllers, fat models. It was good at the time, because people thought all of the application code belonged into the controllers, and it helped them realize that it’s good to have just a simple controller layer and push things down. The problem with this motto is that it’s wrong. Continue reading
configure macbook for ruby/rails development
My instructions on how to configure Macbook Pro on Mavericks to work with ruby and rails.
Writing Software that is Easy to Change
I have been on a journey for some time now. It started when I was a 8 year old kid who decided to take his Dad’s Betamax apart to see how the movies got in there. It continued when I was 10 and I got a Commodore and played tape-drive games like Red Baron. My future was forever set in stone when I arrived at a new Jr. High School @ 13 and they had AppleIIes in my home room, math lab, and computer lab. [more inside]
Rake tasks from a Rubygem
Short blog post on exposing new Rake tasks to an application, through a gem. [more inside]
Backend app & client, hooking it into rack and a server, 43sloc
While working on a client to consume an app, I needed to figure out how to test it. A little research and a little playing around led to this proof of concept. [more inside]
Why Git's Post-Receive Hooks are Broken (and a Ruby-Based Fix!)
Git hooks can be useful, but they’re arcane and obscure… And written in Bash. OnLive has written a nice Ruby-based library to fix that… [more inside]
Useful Gems for Rails Developer. Part 1: Development
I just published the article about usefull gems in development for Rails developers. Hope, you’ll have fun reading it!
Find next / previous ActiveRecord records out of the scope in one query
ActiveRecord extension to find out near by (proximal) records (previous and next) from the ActiveRelation scopes (tried to use AREL as much as possible). [more inside]
Setup Rails on Ubuntu 14.04
Ubuntu 14.04 just launched and I released a new GoRails tutorial to cover installing Ruby 2.1.1 and Rails 4.0.4 on it. [more inside]
Getting started with QueueClassic
We wrote a little something to help you getting started with QueueClassic. What is QueueClassic you might ask? It is a “simple, efficient worker queue for Ruby & PostgreSQL.” [more inside]
Fragment caching with Rails
I just published a post about caching with Rails: Rails caching.
Fastly CDN releases rails plugin and more!
Fastly launches the fastly-rails plugin for easy dynamic edge-caching, an open beta EngineYard add-on, and updates on the CDN Sumo Heroku add-on. Full post here.
How to DRY Rails routes
Some large Rails app have many resources in their config/routes.rb, some are repeated and could be DRY up. In following tutorial How to DRY Rails routes, the author walk you through how to achieve that with both Rails 3 and Rails 4.
Searchlight - the low-magic search gem
Users of MetaSearch/Ransack, have you seen Searchlight? It’s a low-magic search gem that’s powerful and easy to understand. It helps you map form options to methods you write, and inside those methods, you can do whatever you need, from where(name: name) to complex SQL queries. [more inside]
Pundit - MetaCasts.tv*
In this episode we’ll learn how to use the Pundit gem to lock down access to objects in an API. Using TDD to drive the development of Pundit policies and scopes we’ll understand the basics of using this authorization library. [more inside]
Accessing Models With Confidence In Cucumber Specs With Factory_girl
Now we can access models in the same way in every step definition, having confidence that it will never be nil More…
How to create calculator in Shoes.
I wrote a guide about how to create calculator in Shoes