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.
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
Physical separation in Rails apps
Physical separation in Rails apps what are your options? Directories, gems, engines? Anything else?
Build Your Own Blockchain in 20 Lines of Ruby - blockchain.rb @ Awesome Blockchains
Hello, Inspired by Let’s Build the Tiniest Blockchain
In Less Than 50 Lines of Python I’ve put together a Ruby version. Blockchains, blockchains, blockchains! See the blockchain.rb sample in the Awesome Blockchains repo. Use $ ruby ./blockscript.rb to run. Happy blockchaining. Cheers.
Roda 3.0.0 Released
Roda 3.0.0 has been released. This release of the web toolkit offers better performance, raises errors instead of silently ignoring unsupported matchers or block results, and has more secure defaults.
ElasticSearch vs Algolia
Comparison between ElasticSearch and Algolia. Extra: Some cool gems to integrate your rails app with Rails.
Ruby on Rails Books for experienced developers
This time we’ll jump to the next level by focusing on advanced RoR resources, perfect for those who have vast experience under their belt and feel comfortable in Ruby on Rails environment: Ruby on Rails Books for experienced developers
Security Updates for Ruby
New Ruby versions released with security updates as four new CVEs have been publish on September 14th, 2017. [more inside]
Validating Form Objects
Where should we place validations? In the model or in the form object? We answer this question in the third and final article of the series on Form Objects.
Crystal ANN - announcements for Crystal language
We are happy to share with you a resource similar to RubyFlow, but for Crystal programming language. Can’t wait for your announcements ❤️
Rails & GraphQL
Two articles I wrote on GraphQL in Rails: The first is about implementing GraphQL in Rails and the second is about GraphQL performance.
Rails: make sure you have proper DB indexes for your model’s unique validations
An article shows 2 solutions how Rails model’s unique validations should be implemented to save performance https://medium.com/@igorkhomenko/rails-make-sure-you-have-proper-db-indexes-for-your-models-unique-validations-ffd0364df26f