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.
factbook.json & gem - Turn the World Factbook into Open (Structured) Data w/ Ruby
Hello, for some more info and background about the factbook gem and the free public domain factbook.json datasets and the C.I.A. World Factbook - I’ve put together talk notes titled “factbook.json - Turn the World Factbook into Open (Structured) Data” for the Open Data Vienna meetup. Enjoy. PS: Trivia quiz: What country has the most crude oil - proved reserves (according to the World Factbook)?
One request can be multiple commands
In one request can be multiple commands I explain how understanding that sometimes our forms or http requests are so big they convey multiple logical commands can help you simplify your code.
Telegram Bot app template
To start writing your bot from template - a matter of minutes. While new integration tests provide simple way to check bots in multi-user environment.
Rails: Generating Enum Hash Filter
In this episode we show you how to use ruby’s inject (reduce) to generate the hash for the filters to be rendered in the view.
An in-depth tutorial on Ruby blocks
Using Blocks in Ruby is a free excerpt from the Head First Ruby book. It demonstrates what blocks are and why they exist, then walks you step-by-step (with extensive diagrams) through the flow of control in a program that uses blocks. If you’ve struggled with blocks in the past, this is the best tutorial out there!
Swift for Javascript and Ruby Developers
I recently presented on the topic of learning Swift from the perspective of a developer currently familiar with Ruby or Javascript. I showed off some of the reasons why Swift is a pretty exciting language for those used to working with lightweight scripting languages, and I also demonstrated some example code that highlights similar functionality implementations across all three languages. Check out the presentation here.
Hanami v0.9.0
New hanami-model engine based on ROM. Database automapping, data integrity for entities, experimental associations, native PostgreSQL types. http://hanamirb.org/blog/2016/11/15/announcing-hanami-090.html
How to change source for Active Model?
The nice thing about Active Record scopes is that you not only can specify where conditions. I recently had a need to run a query against a model to discover previous and next elements. This can be easily achieved using window functions. The trick was to change Active Model to use the query instead of the table.
Use of Gon with Javascript & Rails
Using Rails data as a part of javascript is an extremely regular need, particularly for Javascript applications such as Angular, Ember and SPA. Here’s how you can do that.Use of Gon with Javascript & Rails
Rubycoders.io new landing page !
I have just relased a new landing page for Rubycoders.io please give me a feedback! Thanks!
Running Sinatra in the Pakyow Environment
Pakyow’s new Runtime Environment lets you mount multiple endpoints in a single process. It supports any Rack-compatible endpoint, which made me wonder if it would be possible to run a Sinatra app within the Pakyow Environment. I recorded a screencast with what I found »
A Rubyist's Guide to Big-O Notation
Big-O notation gives you crucial insight into why your apps aren’t as fast as you’d like them to be. In this post we’ll uncover the meaning of things like O(N^2)
and show how to use these concepts to speed up your apps and your database queries. - http://blog.honeybadger.io/a-rubyist-s-guide-to-big-o-notation/
Gemsmith 8.0.0
Happy to announce a major version release of Gemsmith. This is a powerful tool for building professional-grade Ruby Gems with an emphasis on modern design, security, and high code quality standards. Also supports publishing to RubyGems or private gem servers. For further details, check out the v8.0.0 Changes.
[Screencast] Getting Started - Ruby on Rails - Development Environment
Here is a simple workflow of setting up a new development environment. From Homebrew, ZSH, Atom, and RVM, learn how to easily get your macOS environment up and running. https://www.driftingruby.com/episodes/getting-started-ruby-on-rails-development-environment
Thredded v0.8
Thredded, the best Rails forums engine, has just released v0.8.2. This is a major release that adds these major improvements: [more inside]
Your first Progressive Web App on Rails
New JavaScript APIs are making it possible to deliver mobile app-like experiences on the open web—think: offline access, background sync, push notifications. “Progressive Web App” technology is still very young, but has a lot of promise and it’s time Rails community took notice. In this post, we’ll demonstrate how to turn your Rails app into a Progressive Web App using the serviceworker-rails
gem. https://rossta.net/blog/make-your-rails-app-a-progressive-web-app.html
Testing Rake Tasks with RSpec Feature Specs
There’s nothing worse than getting into the office, only to find out that one of your nightly rake tasks threw an error and didn’t complete. You get to a point where testing all the pieces in isolation just isn’t good enough. It’s time to be confident that all of the pieces will work together. Time to start testing your Rake tasks with RSpec feature specs
RailsApps Examples for Rails 5.0
I currently maintain eleven RailsApps example applications on GitHub that developers use as starter applications. Each can be generated with the Rails Composer. I’ve recently updated Rails Composer and the example applications for Rails 5.0. Details in a blog post, RailsApps Examples for Rails 5.0.
Flexible, ORM-agnostic, fully customizable and simple OAuth2 provider for Grape API
GrapeOAuth2 gem adds a flexible OAuth2 (RFC 6749) server authentication and endpoints protection to Grape API projects with any ORM/ODM/PORO. It is extremely customizable and configurable and can be used with any ORM/ODM or even Plain Old Ruby objects.