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.
Implementing TinyMCE in Ruby on Rails
TinyMCE is an excellent platform-independent web-based Javascript/HTML editor control, which is highly useful for those who want to allow their users to edit HTML documents online. It is mainly designed to integrate with Content management systems, including WordPress, Drupal etc easily. It is a rich text editor that outputs HTML, making it really easy to add rich content using rails application. [more inside]
Clean PBKDF2: Feedback Request
Here’s a dead-simple, RFC-compliant PBKDF2 implementation that I hope to release in v1 by the week’s end. I’d really appreciate feedback from the community before I cut a gem release. Thanks!
Rails 5's ActionCable and Websockets Introduction
ActionCable is finally out and DHH just posted an example. Let’s take a look and see how everything gets wired up.
Rails Tricky Timezones
Configuring timezones in rails can be tricky if one doesn’t understand the actual config settings and their use. [more inside]
dataTables Column Search with Rails
dataTables is a nifty jquery plugin for displaying large sets of data. However, we need to do smarter column based searching. article
rubyconf.json - A Free Ruby Conference Calendar Dataset - New event.db Format
Hello, I’ve updated the Ruby Conference Calendar machinery. What’s new? A free rubyconf.json dataset for easy (re)use now gets (auto-)generated including all Ruby Conferences listed on the /awesome-events page at Planet Ruby. The event.db gem that reads in the event page now supports a new format that includes the event link/url in plain text for easy printing. Finally, the (auto-) generated Ruby Conference Calendar page moved to the Planet Ruby site. Anything missing? Contributions welcome. Cheers.
Comments or Social plugins - What is better for you?
I wondered if I need (and can) use my own comment management engine on my rails blog but decided to implement DISQUS. Here is Why.
Ruby: Auto-generated dynamic nested blocks wrappings for Ruby and its performance
It’s not really often that you don’t know what will be in a block. Especially when you plan to nest blocks multiple times. However things like this happen and when they do it’s worth seeing how to deal with it and how much it might cost us. [more inside]
Feature testing with RSpec
In this post we talk about how we’ve adapted the way we write tests to use RSpec for both unit and feature testing, leaving Cucumber by the wayside.
Unleash the Power of Storing JSON in Postgres
You can use Postgres as a JSON document store in your Rails app without leaving the relational world behind. Leigh Halliday explains how: [more inside]
Understanding the Asset Pipeline Plugin
The asset pipeline is a very powerful feature that Rails offers, to solve a wide range of problems related to web designing. [more inside]
Writing API wrappers
An Application Program Interface (API), is an avenue for one piece of software to speak to another. This could be a remote, web-based, HTTP API. Or, the API might be an internal interface for one portion of a software system to talk to another. Designing an API that is simple and maintainable is crucial if its intended to be used and quickly adopted by colleagues or 3rd party developers. [more inside]
Nested errors in Ruby with Exception#cause
It’s a common pattern in Ruby to rescue and exception and re-raise another kind of exception. But the original exception isn’t lost! You can use Exception#cause to grab it. In this post we show you how. - http://blog.honeybadger.io/nested-errors-in-ruby-with-exception-cause/
A case for instantiating behaviour
In this post we compare 2 solutions to a minor problem. One where the object gets instantiated with the data it should perform on, and the other with the “behaviour” it should do. Check it out
Rails: Don't index the kitchen sink!
Learn how unnecessary indexes easily sneak into your Rails application, and what you can do about it.
Validates_Type a type validator for Rails
No one is particularly fond of littering their code with trys and is_a?s. To remedy this, I make my models assert confidence that the data in my database is what I expect. I’m not talking about type coercion, type casting or any other munging of types that might happen on a typical read/write from your handy dandy ORM of choice. No no, this is the real deal, the bees knees, the elbows of a gazelle: actual type validation.
Module in Ruby
Ruby has many strengths and is a very malleable language. Ruby can be written functionally or object oriented. I tend to lean toward the latter and find myself using a few different patterns regularly. One powerful tool Ruby provides is the use of Modules. You can learn how to use this tool by extending and including modules
Validates_Subset a subset validator for Rails
Do you suddenly wake up in a cold sweat, wondering if there is finally a way to validate that your data is a proper subset that you desire? I too have experienced this horror, and that is why I made a rails style subset validator.
Ruby and Rails Testing Changes Roundup
Over the past few months, there have been a number of developments that will affect the way you test your Ruby code and Rails applications in the future, but you might not have heard about them unless you were paying close attention. This post collects some of the most interesting and important changes in one place.
JRuby - Just Ruby
What is JRuby? Well it is just Ruby, with some sweet performance and parallelism of course! Read about it, who uses it and other advantages here: JRuby - Just Ruby
Citizenship - simple yet useful validation of Portuguese cards
Citizenship is a simple gem that allows validation of Portuguese documents or common identifiers, such as citizen card numbers, bank account numbers (NIB), fiscal numbers (NIF) and more. As most of these IDs have some kind of checksum, Citizenship calculates and verifies them accordingly. We also provide some convenient methods for validating local phone numbers and email addresses. [more inside]