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.
CocoaConf DC: 7 top sessions to look forward to
If you’re headed to CocoaConf this weekend, but can’t decide which sessions to see, check out these 7 sessions picked by @tvon.
A lightweight gem for swapping out text with a fully-compliant Rails form in one click using JQuery.
I just released a gem called abracadabra and it makes injecting forms with text boxes super easy.
Ruby SuperModule Comes To The Rescue!!
Tired of Ruby’s modules not allowing you to mix in class methods easily? Tired of writing complex code and using complex libraries like ActiveSupport::Concern to accomplish that goal? [more inside]
Efficiently Getting Random Records in Rails Active Record (with a benchmarking example)
Many applications require the retrieval of random database records (for instance to highlight a random product in an online store). There are several ways to accomplish this task, but efficiency varies widely and becomes more pronounced as your database grows in size. This blog post demonstrates two common approaches when using Rails Active Record and MySQL, and benchmarks both (using the Ruby Benchmark module) to demonstrate their efficiency.
How to tune a guitar with Ruby
Check out my blog post How to tune a guitar with Ruby. [more inside]
The Build a Ruby Gem Ebook is live!
The Build a Ruby Gem Ebook and Screencast packages are now for sale. Hope you enjoy!
Thread Safety with Ruby
Moore’s law is over. Modern computation is exploited by running processes on multiple cores. [more inside]
Running Thin in a Thread to serve static files (or how to seed carrierwave images)
Running Thin in a Thread to serve static files (or how to seed carrierwave images) - code snippits and words describing how to upload images using carrierwave from the commandline.
RubyConf India 2014 – The Goa Edition
The 5th edition of the conference was a roaring success. Read about it here.
Why is my CDN 'slow' for mobile clients?
Actually, it’s likely not any slower for mobile clients: don’t confuse relative performance with absolute (latency) savings. Confused? Read on…
Two Approaches to Creating Default Rails Active Record Model Attribute Values
In the runup to the publication of my new book, “Easy Active Record for Rails Developers”, I’m publishing a series of posts covering commonly confusing or little-used Active Record features. The latest discusses two approaches to creating default Active Record model attribute values.
How to read one non-blocking key press in Ruby
Want to know how to read a single character in a non-blocking, buffered, cross-platform way in Ruby? I just got you covered in my new blog post. Hope this will help many.
Skip ActiveRecord callbacks in tests
Check out my recent post about how to skip active record callbacks in tests.
Lexeme, a simple lexical analyzer written in Ruby
Hi Lexeme users, [more inside]
Maths Practice
I just launched a revised beta version of Maths practice app for 6 to 10 year olds (May be even for adults !). Please check it out.
12 Small Web Frameworks for Ruby
I have been putting these posts together for all programming languages, at least those who’re supportive of web frameworks, first I’m on a mission to cover all of the minimal ones - then move on to bigger guns! [more inside]
Rails API discovery is hard
Many times, we feel we should use gems to solve our problems. I believe gems should be a last resort in many cases since Rails already have most of the API to solve the problems you need. [more inside]
3 Ways to Start Your Ambitious Rails Project
Last week, I talked about three conventions that can help you beat procrastination and get your new Rails project started. But you still have a tough choice to make. Which code do you write first? Authentication? The part that talks to Twilio? And how would you even begin to work on the forum post recommender engine? Yep, at some point you actually have to write the code, and to do that, you need a place to start.
Refactoring a 47-line Ruby script back to 1 using command line options
Here’s a story about using some of Ruby’s powerful command line options to refactor a large-ish script to (essentially) a one-liner. Read Using Ruby command line options.
Form object validations in Rails 4
We have written a blog post about how to write, and validate form objects here. Examples in the blog don’t use any gems, and just use services provided by ActiveModel::Model to implement form objects.
How to Build a Rails Engine
Curious How to Build a Rails Engine?. This post will walk you through the process of creating a Rails Engine for a client-side timestamp gem. Enjoy!
How to create todo list app in rails
I wrote first part of series of posts about how to create todo rails app
BigBroda - ActiveRecord adapter for Google BigQuery
BigBroda is an ActiveRecord adapter for Google Bigquery. It supports many of the AR awesomeness: querying, associations, migrations and yadayada