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.
All the ways to generate routing paths in Rails
Did you know that named routes are not your only option? Check out all the ways to generate routing paths in Rails
How to Build a React App that Works with a Rails 5.1 API
Learn to build a React app that works with a Rails 5.1 API in this hands-on tutorial. The tutorial covers stateless functional components, class-based components, using Create React App, use of axios for making API calls, immutability-helper and more.
3 ways that will make you React with Rails developer
Have you ever wonder that how to create React with Rails application? Read here about most popular ways for creating react with rails app. [more inside]
Do. Or Do Not. There Is No Try - Object#try Considered Harmful
Object#try is quite a commonly used method in Rails applications to cover cases where there is a possibility of dealing with a nil value or to provide flexible interface for handling cases where some kind of object doesn’t necessarily implement given method. Thanks to try, we may avoid getting NoMethodError. So it seems like it’s perfect, right? No NoMethodError exception, no problem? [more inside]
A couple words on Arrays in Ruby
Description of interesting and sometimes unexpected behavior of Arrays in Ruby: http://rubyblog.pro/2017/09/couple-words-on-arrays
find_by_sql_paginately gem - add paginatability to original find_by_sql rails method
Hello everyone, I have just released a gem called find_by_sql_paginately - https://github.com/jameshuynh/find_by_sql_paginately to help developers be able to use find_by_sql with pagination ability. Happy to share and if possible please help to leave some feedbacks.
blockchain-lite gem v1.1 adds proof-of-work blocks - build your own blockchains
Hello, I’ve updated the ready-to-use out-of-the-box enterprise-strength blockchain library called blockchain.lite. What’s news? Now includes a new proof-of-work block type that lets you mine for lucky numbers when computing the crypto hash. Revolutionize the world with blockchains, blockchains, blockchains one block at a time. Happy blockchaining with ruby.
Getting Started with Ruby on Rails 5.1.4 and Angular 2+
In this tutorial we’ll see how to integrate Angular 2+ framework with Rails 5.1.4 by building a simple demo CRUD web application with Rails on the back-end and Angular 4 on the front-end. Read the full tutorial here.
Et pourquoi pas un peu de ruby en français ?
J’ai écris le programme d’un cours de webmarketing illustré techniquement avec ruby on rails. Mediabuy programmatique, landing page, tracking, tests A/B, monétisation, tout est abordé et mis en oeuvre avec du code ruby et rails » formation ruby on rails «
The 5 Habits Of Successful Ruby Developers
Learn what it takes to become a world-class Ruby developer with this video + PDF guide https://www.rubyguides.com/5-habits/
Transactions & Connections in ActiveRecord
You may have notice you can create databases transactions in all classes inheriting from ApplicationRecord. What is the point? Are they all equivalent? Read more
render_async 1.0 released: Speeding up Rails pages with caching
Speeding up Rails pages with render_async has more options and it supports caching. Most notable changes: [more inside]
Top 15 Ruby on Rails web applications
Most famous web applications written with RoR towards the web domination!
Bug-Driven Design
A tale about a hard-to-fing bug and how it helped improve the code design https://ylan.segal-family.com/blog/2017/09/21/bug-driven-design/
Don't call us, we'll call you: Sending webhooks with Rails
Are you thinking about allowing others to integrate with your application? Or maybe you just want to build a Zapier app? Either way, you’ll probably want to use webhooks for (near) realtime updates. Learn how to send webhooks with Rails!
When should I use SJR?
Rails 5.1 makes AJAX the new default for form submissions using the form_with helper. In addition to forms, what other use cases are there for remote: true in a Rails app? Here are a handful of scenarios where you may want to try using SJR
Using the scikit-learn Python machine learning library in Ruby using PyCall
In this post we will use the scikit-learn Python library to build a SVM handwritting classifier inside a Ruby application. We will show how to load the Python library in Ruby and highlight some of the differences you’ll need to know to use the sci-kit learn toolbox from Ruby. Read more: https://www.practicalai.io/using-scikit-learn-machine-learning-library-in-ruby-using-pycall/
Watch out for Ruby blocks scope gotcha
Blocks are probably one of the best parts of Ruby. They bring much of its flexibility and power. They have their own scope and can be used to create closures. This lead me to introduce a bug in an app recently. Read more…
Social Media Monitoring with Source Code
Apphera 3.0 is about to be released and comes as annual subscription including Ruby source code. Besides social media monitoring (Twitter, Facebook etc) we added comprehensive competitor analyses and also new with Email campaign tools including a data miner to extract emails from the Internet for business to business (!!) campaigns (don’t spam please). As always I will also add a open source/free version of my Rails based platform. This time I added a Node-Red based tool to the mix as it allows to create work flows in a graphical way.
[Screencast] Polymorphic Associations
Advancing from Single Table Inheritance, learn how Polymorphic Associations differ and tricks to simplify their usage. https://www.driftingruby.com/episodes/polymorphic-associations
blockchain-lite library / gem - build your own blockchain with crypto hashes in ruby
Hello, I’ve bundled up the blockchain.rb sample from Awesome Blockchains into a ready-to-use out-of-the-box enterprise-strength blockchain library called blockchain.lite. Use like: b0 = Block.first( "Genesis" ); b1 = Block.next( b0, "Transaction Data..." ) ... and so on. Revolutionize the world with blockchains, blockchains, blockchains one block at a time. Happy blockchaining with ruby. PS: Proof-of-work upcoming :-)
tty-file v0.4.0 release
The latest tty-file apart from bug fixes adds a new tail_file api which can be used for reading files backwards. By default 10 lines are read which can be configured. Enjoy!
Ruby on Rails before_render filter
If you ever needed a filter that will run just before render in controllers is triggered, here you go. https://github.com/dux/rails_before_render