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.
How to upgrade to Rails 5
Ruby on Rails version 5 is just around the corner, with 5.0.0.beta3 released in late February. Is your app ready? Follow these best practices to make your upgrade go as smoothly as possible.
Make the Impossible Possible
Great things are buried where you don’t expect them. Like jewels buried in the earth a mistake can lead to great possibilities. When you choose not to hear the naysayers you may just Make the Impossible Possible
Wye Tech News #13
A new issue of our weekly compilation of interesting news and articles about Ruby, Rails, JavaScript and web development related stuff that we found during the week.
markdownlint (mdl) tool (gem)- document style/rules checker - new docu (book edition)
Hello, if anybody is using markdown - I’ve put together an online book edition (using the manuscripts format) of the markdownlint documentation and style rules by Mark Harrison. Again thousands thanks to Mark Harrison for the great tool and documentation. See Markdown Lint Tool Documentation (Book Edition). Cheers. PS: Interested in more docs as books? See the Hyde Press Bookshelf.
Structuring Models
Here’s a good way to structure models that you can extend to any object. [MORE INSIDE]
Upload multiple files using Dropzonejs in Ruby on Rails
You can read more in:
Simple signup and login in your app (Part 2)
This is part 2 of my blog post series about creating a simple signup and sign in flow using Rails’ built-in has_secure_password features.
What is Redis? A gentle introduction using Ruby
Redis is a free and open-source in-memory key-value store, similar to Memcached (used to speed up dynamic web applications by caching data in RAM) with the main difference of being persisted to disk and having more data types. In this article you will see an introduction on how to interact with Redis using Ruby.
Compress Custom Web Fonts in Rails 4.2 Apps
Learn how to compress custom web fonts in Rails 4.2 apps without writing any code.
How I Do Rails Controllers
In light of DHH’s current insights on how to structure Rails controllers, I’d like to share how I typically handle controllers in a Rails application. (tl;dr I use CanCanCan and Responders to keep my controllers lean and boring.)
Ruby's Scaffolding Tool for New Projects (Gems, Sinatra, etc.) e.g. $ quik new gem
Hello, I’ve moved all quik project templates and scripts to a new github org, that is, quikstart. What’s quik? quik is a ruby quick starter template script wizard .:. the missing code generator. Try: Read more
Simple gem for writing conditionals with dates and time
- when debugging legacy code or introducing myself to a new codebase, I always have struggled with figuring out which date is in the future and when the condition is going to be fulfilled. So I wrote this gem to provide easy to read predicates for Date and Time objects.
Create Sprite Files using Compass Gem
Learn how to Create Sprite Files using Compass Gem
Compass Gem Basics
Write a Hello SASS program to learn the basics of SASS.
Does Rails everything for us?
The latest Rails security fixes were another reminder that we shouldn’t rely too much on a framework to solve everything security for us. Let’s take a moment every time we use user input directly (like in render params[:id]) and think about what class it could potentially be: Fixnum, String, Array, Hash, nil, a blank string. This and other news in the Rails and web app security reading list.
Stronger Parameters Gem
Discovered this today - a gem to help with type-checking submitted Rails params:
Rails 5 adds http_cache_forever to allow caching of response forever
Rails 5 allows to cache HTTP responses forever by introducting http_cache_forever method. Read more
ActiveRecord is reinventing Sequel
I’ve been happily using Sequel for over a year now, and was finding it to be consistently better than ActiveRecord. Moreover, I found out that most of new ActiveRecord’s features were already part of Sequel for quite some time. I think that’s a big and controversial discovery, so I decided to write a post where I attempt to prove my claims.
Avoid race conditions with record locking
Especially useful with high volume applications, record locking helps to maintain data integrity and avoid race conditions. [MORE INSIDE]
Experimenting with database indexes - How fast can it get?
In this blog post I’m explaining what database indexes actually are and how much they can improve your query times in a Ruby on Rails application that contains a lot of records. The tests are done on a Postgresql database. Read more
Upgrade Legacy Passwords to Use Devise
Sometimes you get an old app that has a garbage password encryption scheme. Find out how to seamlessly update it to secure your app and prevent a security event.
Stay Static - Jekyll vs Middleman - And the Winner is...
Hello, For tonight’s Vienna.rb meetup I’ve put together a talk titled “Stay Static - Jekyll vs Middleman - Build Static (Web) Sites w/ Ruby”. The agenda reads: Read more