RubyFlow The Ruby and Rails community linklog

×

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

You can use basic HTML markup (e.g. <a>) or Markdown.
Note that your post may be edited to suit the format of the site.

As you are not logged in, you will be
directed via GitHub to signup or sign in

Post Preview

Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.

Determining User and Location Coordinates with the Geocoder Gem

Location-based web applications calculate distance between objects using the latitudinal and longitudinal coordinates and the Haversine formula. But how does one determine an object’s coordinates given a street address or IP address, let alone calculate the distance between two sets of coordinates? Fortunately the Geocoder gem turns these otherwise complex tasks into a fairly trivial matter. In this post I’ll show you to to integrate Geocoder into your Rails application.

assets-rails v0.1.0 released

assets-rails allows you to require javascript and stylesheet libraries with the exact version so that your frontend stuffs will continue to work as times passed by. You can use different versions for different templates in a single Rails application.

Pastel v0.3.0 released

pastel got even stabler and faster. Fixed bugs concerned with nested styles, improved speed and added ability to alias colors at runtime through environment variable and library interface. This is a component that will be part of tty toolkit

`respond_to` without all the pain

When you generate a scaffold in Rails, you’ll see the usual respond_to blocks. But some of your actions, like index, don’t have them. And those actions, when hit with a bad format, will raise the wrong kind of error. You want to handle bad formats correctly, but littering all your controllers with big respond_to blocks is crazy. It feels un-Rails-ish. So what do you do?

Loading older posts