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.
Refactoring series: acts_as_list part 3
In this refactoring adventure I’m going to focus on just one 11-line method, and surprisingly, there’s a lot of things that can be improved in just one method. Watch as I choose better names, strip unnecessary variables, work with some ActiveRecord internals and make code intent clearer. https://rubyclarity.com/2017/06/acts_as_list-refactoring-part-3/
How to convert a Ruby primitive to a custom domain object in two minutes
You already know why you want to use domain objects instead of Ruby’s built-in primitives… but what do you do if you’ve already used strings and integers all over the place? Did you code yourself into a corner? Are you going to have to change lots of code, and potentially break things? Of course not! You can convert a Ruby primitive into a custom domain object in just a few minutes…
Conference Talks, Interviews, and the Pen!
As many of the people who follow this feed are tech conference speakers, I’d be interested in hearing feedback on my take of most tech talks. http://www.akitaonrails.com/2017/06/01/conference-talks-interviews-and-the-pen
Ruby Case
Well, today I bring the way how Ruby treats it’s switch case. Let’s go, check out this post: https://merubygirl.wordpress.com/2017/06/01/english-version-ruby-case/
Simple tutorial on how to integrate Facebook and Rails 5
Learn how to do a simple Facebook integration in Rails 5 using Devise, Omniauth and Koala. https://revs.runtime-revolution.com/working-with-facebook-using-devise-omniauth-koala-and-rails-5-cde5d032de02
Exploring infinite sequences
Infinite sequences can make some algorithms (like numerical analysis) more clear by allowing common code to be reused. Haskell’s lazy evaluation makes infinite sequences easy in that language, but it’s possible in Ruby, with a little work.
Using React in your Rails app
Learn how to use React easily in your new or existing Rails app. https://blog.codeship.com/using-react-inside-your-rails-apps/
Writing Ruby gems with Rust and Helix
Learn how to write (from scratch) faster Ruby gems with Rust and Helix. https://blog.dnsimple.com/2017/05/writing-ruby-gems-with-rust-and-helix/
Why write code when more dependencies will do?
Adding gems is so easy, but sometimes your own code is better. Why write code when more dependencies will do?
Obey the "Single Level of Abstraction" rule
This rule helps to make your code more readable, you must obey the rule.
Lessons learnt in our third year running a Ruby dev consultancy
Hola everyone! It’s been a while since I haven’t posted anything, but I’d like to share our latest blog post. [more inside]
A quick tour of metaprogramming
If you pry into the beating heart of any Rails application, any testing framework, any beautiful DSL, you’ll find it filled with metaprogramming: code that writes code. In fact, a lot of the features Ruby devs use would be impossible without it. Yet many of us prefer to avoid metaprogramming in our own code. This is a brief tour of metaprogramming for Rubyists. http://www.rubyletter.com/newsletter/2017/05/26/metaprogramming.html
Rails 5.1 adds delegate_missing_to
This blog http://blog.bigbinary.com/2017/05/30/rails-5-1-adds-delegate-missing-to.html discusses how Rails 5.1 added delegate_missing_to method.
What’s new in Rails 5.1
Let’s take a look at some of the changes that Rails 5.1 brings
19 Ruby on Rails Gems which Can Amaze
Ruby on Rails is great for its gems. Our team has picked up our favorites to share them with you. https://blog.rubyroidlabs.com/2017/04/19-ruby-on-rails-gems
Phoenix is better but Rails is more popular
Some thoughts about which framework to use. Ruby on Rails or Phoenix Framework? Ruby vs. Elixir. https://hackernoon.com/phoenix-is-better-but-rails-is-more-popular-8975d5e68879
Fragment Caching with Rails 5.1
A quick introduction into fragment caching with Ruby on Rails 5.1. https://medium.com/@wintermeyer/https-medium-com-wintermeyer-fragment-caching-with-rails-26476fc2a985
[Screencast] DataTables
The DataTables Javascript library creates a powerful display of your application’s data. Some of the features include pagination, server side processing, sorting and search. https://www.driftingruby.com/episodes/datatables
Planet Feed Reader in 20 Lines of Ruby (Atom, RSS & @JSONFeed)
Hello, I’ve added a planet feed news reader sample in 20 lines of ruby (with inline erb template) to the universal feedparser gem docu. Note: the feedparser now has built-in support for the new JSON Feed format. Happy planet. Happy hacking. Cheers.
S[O]LID - Open/Closed Principle by example
Describes how to keep classes and methods open for extension but closed for modification: http://rubyblog.pro/2017/05/solid-open-closed-principle-by-example
Leveling up with Git
Level up with Git — From the basics to managing multiple cross dependent branches and emergency situation solutions. https://6ftdan.com/allyourdev/2017/05/25/leveling-up-with-git/