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.
Powerful table filters in Rails DB
https://www.youtube.com/watch?v=dfViQPZw9zE - see quick demo to see example of using powerful filters in Rails DB. Multiple conditions, sorting added. [more inside]
TheMask v0.2.2: Data mining gem
If you’re performing a lot of data mining or data extraction, this is the gem you should be checking out: https://github.com/saouddk/the_mask
Rails 5 Basics : Model View Controller
Read the fourth chapter from Rails 5 Quickly book online here Model View Controller
tty-cursor v0.1.0 first release
The purpose of tty-cursor library is to help move terminal cursor around using intuitive commands. It also allows to clear text in relation to the current cursor position. This is a independent component in tty ecosystem. Enjoy!
Boost your content focussed site with Structured Page Fragments
A tutorial outlining how to integrate Rails with SPF.js, A lightweight JS framework for fast navigation and page updates from YouTube. [more inside]
Rolling back complex rails apps
Rolling back complex rails apps might scare you and be a problematic procedure. But there are steps you can take to make it easier and less error prone. Be safe when something goes wrong.
Rails 5 Basics : Model
Read the third chapter from Rails 5 Quickly book online here Model
Iterative Evaluation
Here I demonstrate how iteration works in Ruby and delve into lazy evaluation and some functional and OO methodologies. Iterative Evaluation
aruba 0.11.1 released
We are pleased to announce “aruba” version 0.11.1. aruba
is a gem to test command-line applications with Cucumber-Ruby, RSpec or Minitest [more inside]
Rails 5 Basics : Hello Rails
Read the second chapter from Rails 5 Quickly book online here Hello Rails
Shrine 1.0.0 released
A month ago I released Shrine, a new solution for file uploads in Ruby, and now it has reached 1.0.0. There are a lot of new features, improvements and fixes, take a look at the release notes.
Choosing my editor for Ruby on Rails
When it’s time to choose an editor for Ruby on Rails, you will find a variety of good options. From the most austere to a true beast. I have been trying out the most known editors and wrote some notes that I want to share. http://davidmles.com/blog/editor-ruby-rails/
Rails 5 Basics : Running the Server
I am updating the Rails 4.2 Quickly book to Rails 5. If you would like to read it online, checkout the first chapter from Rails 5 Quickly Rails 5 Basics : Running the Server
Making controller logic easier to test, by removing it from the controller
The gem can be found here:
https://github.com/NullVoxPopuli/skinny_controllers
It’s inspired by trailblazer, but sticks more to how rails is laid out.
To use the default functionality, for each of your actions, you can just
do:
render json: model
or however you want to render the response.
model
is a memoized method
that looks up an operation and policy and applies whatever custom logic you want to implement.
Checkout the readme for details.
[more inside]
Testing Rails Background Workers
The addition of Active Job to Rails gave developers a single, unified interface for a number of popular background processing frameworks including Sidekiq, Resque, and Delayed Job. In this post, we’ll look at a step-by-step process for testing your workers from top to bottom using Active Job and Minitest.
Getting Started with Minitest
Just published a tutorial for SemaphoreCI’s community on using Minitest in your Ruby projects with TDD. Check it out here.
How to speed up querying for autocomplete field with Rails and MongoDB
In a project I am working on I have an autocomplete input field on a form which searches in a database of about 200000 documents of potential customers. Read my findings about how to speed up searching http://www.drgcms.org/blog/Damjan%20Rems/how-to-speed-up-querying-for-autocomplete-fields-with-mongodb-2015-11-24
Resque Gem : For Background Processes In ROR
Resque creates background jobs using Redis. Since it supports multiple queue, we can place them on multiple queues and process them later as well. And it comes with an administration interface for monitoring and managing the queues. Read full article on RailsCarma<?a> Blog.
Is it nil?
This is an article about what happens in Ruby when you ask something if it is nil. A look at the underlying Ruby source code to see what makes the nil?
method tick. Hint: OOP and Inheritance.
How to Write Future-proof Mocks in RSpec 3
Tests are an important component in most software applications. Whether tests drive the development, or are bootstrapped on after the fact, tests need to be reliable for future development to progress. An application’s complexity rises with time. During and after this increase, ensuring that a test suite makes the right assertions and mocks in an intelligent and sturdy way is crucial.
JSON API Apps With Lotus
Do you need a fast and lightweight JSON API app? It must be powerful, flexible, quick to develop and easy to deploy? Here’s a tutorial that shows how to build it with Lotus. It will take you 15 minutes, deploy included.
Static Site Generator of the Year 2015 - Middleman or Jekyll?
Hello, For today’s Vienna.html (static site) meetup I’ve prepared a talk titled “The World’s Greatest (Free) Static Site Builders / Generators”. Browse the slides (use space to flip through) or the all-in-one page source. What your favorite static site builder / generator? Jekyll? Middleman? Nanoc? Any other? Vote for Year 2015 Award on Twitter. Cheers.