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
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
In this video, I explain how to generate a CSV file containing attributes and serve it up in the browser using the
send_data method in the controller. Watch the screencast on Exporting records to CSV in Rails
In this post I show how to - debug faster - Find N+1 queries and other things that are slowing down your application - A cleaner console without asset requests and how to get - View Newrelic data locally without having an account Read it at http://www.rubyonrails365.com/7-must-have-gems-to-install-on-any-project/
Barbara Liskov introduced her substitution principle back in 1987 during her keynote titled Data Abstraction and Heirarchy. Today, it is one of the five SOLID principles in object-oriented programming. “Instances of any type should be replaceable by instances of its subtypes without creating incorrect behaviors.” How can we ensure that our classes abide by the Liskov Substitution Principle? [more inside]
You can use the
Summarized in a personal blog post.
After reading the Sorrows of a New Developer post, I realized that my attitude toward programming has changed over my career, and I decided to write up a piece of my own, on the ways that my coding practice has evolved.
The 5.x series of Passenger – aka “Raptor” – introduces many major improvements like much better performance, a new HTTP JSON API for better insights into server and application behavior, better logging and WebSocket support, and more. Read the release announcement to learn more.
Hello, I’ve added some more datafiles that let you build your own football.db - using free open public domain datasets - with a single command e.g.
$ sportdb new fr2014-15. The new datafiles include: de.rb and de2014-15.rb; es.rb and es2014-15.rb; it.rb and it2014-15.rb; fr.rb and fr2014-15.rb; at.rb and at2014-15.rb; top.rb and top2014-15.rb (includes top leagues e.g. en,de,es,fr,it). Cheers.
Choosing to not wait for a backend while processing user actions on frontend has interesting consequences. We’ve made an analysis of pros and cons of two most common approaches. Interested? Take a look here!
A more in-depth look at using case switching in Ruby. http://6ftdan.com/allyourdev/2015/03/03/ruby-the-case-for-case/
When your data model gets complicated, and your APIs hit that sad 1 second response time, there’s usually an easy fix:
:includes. But if you want to cache your responses, you can only fetch one object at a time, and you can’t get all the benefits of
:includes. So how do you get a fast response for your cached objects, and still load the objects that aren’t in the cache, quickly?
Have you ever tried to modify a frozen object? Or have you always what a frozen object is, exactly? This post explores how frozen objects in Ruby can be dangerous, and why they’re useful.