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.
Rails Misapprehensions: Single Responsibility Principle
SRP is, hand in hand with MVC, Decorator, and SEO, one of the most misunderstood concepts in the Ruby community. In a quick post I describe what SRP means and how you can use it when designing APIs.
Mocking and Ruby
Here are some thoughts about mocking and ruby: Mocking and Ruby.
Nested layouts in Rails
Check out this post about Nested layouts in Rails
Integrating Framework7 (mobile UI framework) into Rails - Codemy.net
In this episode we show you (13:24 minutes) how to integrate a mobile framework into a Rails application.
3 Simple but Powerful Takeaways for Ruby Devs from Sandi Metz
3 key takeaways from her talk that we saw:
Rails 4.1: Email Previews - MetaCasts.tv*
In this episode we’ll learn about the new email preview functionality built into Rails 4.1 to preview emails during development. Read more
Ad-hoc deployment to Installr for your RubyMotion apps + a competition
I have a special episode for you all today! This is a normal episode just like any other, where I’ll walk you through the process of using motion-installr to get setup for ad-hoc deployment using the awesome Installr service. The twist is though that I also have a competition for you! Here is the episode and this is the competition details.
BabyErubis - yet another eRuby implementation, based on Erubis
BabyErubis is an yet another eRuby implementation based on Erubis. Only 200 lines of code and easy to customize. Supports both Ruby and Rubinius. (Rails conpatibility is planned at next major release.)
Run tests in parallel with a single database
Tinkering around, trying to get tests to run in parallel, even with a database. Wrote about it in a blog post and came up with a gem.
Monitoring a Refactor with Care
I wrote a post on how to monitor a tricky refactor with New Relic’s APM.
Script-injected "async scripts" considered harmful
Script-injected scripts block on CSS and delay script execution. Their era has passed, and we now have a much better, cleaner, and faster solution: add an async attribute to your script tags.
Asset Manager - Manage your assets in style!
We just released Asset Manager, a Rails Engine that helps you to: *) Manage all your assets (images, pdf, zip, ecc.) in a central repository *) Quickly connect instances of your models with this repository, through a nice graphical interface *) Generate markup for your assets in your views with a series of helper methods Hopefully it will prove to be useful for others as well. Enjoy!
Rails 4.1 Variants
In this episode we show you how to use the new Rails 4.1 feature Rails 4.1 Variant (3.28 minutes)
Learn how Rails' MessageEncryptor Works
Crypto doesn’t have to be intimidating. Read more
When is an ActiveRecord model too fat?
When you read Rails blogs and books, or watch conference talks, you’ll learn a lot about making your models skinnier. These techniques are awesome, because your models will get too big or complex to handle. But do you really want to go as far as having your models only responsible for persistence, associations, and validations? How do you decide which logic should stay in your ActiveRecord models, anyway?
Sharing Code Between RubyMotion and Web projects, and Testing It Better
This is the source code and slides from a talk I gave at the SydInMotion meetup today where I showed everyone how to keep your use cases and business logic in clean, easy (and fast) to test, plain old ruby objects, and then plug in your delivery mechanisms, database, etc. Give it a look if you’re interested.
Using Vagrant for Rails Development
Here’s a quick guide to Using Vagrant for Rails Development to setup a virtual machine to run your application inside. You get to have a consistent development environment on any OS which mirrors your production environment.
sport.db.api.starter Sample - Build your own HTTP JSON API using the football.db w/ Sinatra
Hello, To get started building your own HTTP JSON API / web service using the football.db, worldcup.db, bundesliga.db, etc. try the new sport.db.api.starter kit.
Step 1: Install all gems using bundler.
Step 2: Copy a football.db into your app folder.
Step 3: Startup the web service (HTTP JSON API) using rackup.
That’s it. Open your browser and try some services running on localhost on port 9292. Example: List all World Cup 2014 teams (event/world.2014/teams); list all World Cup 2014 rounds (event/world.2014/rounds) and so on. You’re welcome to change the server script to fit your needs. Enjoy. Cheers.
Lockistics : Statistics collecting shared mutex on Redis
I just released the first version of Lockistics gem. Read more
New gem: sucker_punch-backgroundable
I just released sucker_punch-backgroundable, which allows you to easily background any method call with SuckerPunch without having to write a special job class. Heavily inspired by the Backgroundable module in TorqueBox.
Black-box testing
What is black-box testing and how it differs from white-box testing? Read about it on my blog
Signed parameters with secret key
It is a simple library allows to sign and verify data with secret key. Maybe useful to someone. Details here</s>
Rails Is Not Dead
Rails is not dead. Debating about things such as the hexagonal architecture isn’t an assault to the framework, but a way to evolve as a programmers. If the leaders of this community feel under attack, we have a problem. Please speak up. Read more
Automatic deployments with Travis CI on Ninefold
Ninefold is happy to announce that you can now use Travis CI to automatically deploy your application after a successful build. Read more
Integrate PostGIS and google maps into Rails Part 1
I’m creating a series blogs on how to integrate PostGIS and google maps into Rails, and I just finished Part 1. It talks about how to import the shape files into PostGIS in migrations and generate GeoJSON and then render it in google maps. I would like to hear some comments and suggestions, thanks.