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
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Let Rubocop help you to enforce your styleguide: https://intercityup.com/blog/integrate-rubocop-in-your-workflow.html
Hello, I’ve started yet another awesome collection on GitHub over at the Planet Ruby. What’s news? The awesome-activerecord repo collects ActiveRecord goodies, libraries, tools, extensions, guides, etc. Anything missing? Contributions welcome. Cheers.
After years of not finding this solution; it turns out it’s really quite simple. http://6ftdan.com/allyourdev/2015/05/02/private-module-methods-in-ruby/
Find out all possible chess knights movements using minimax algorithm: http://blog.diatomenterprises.com/ruby-and-recursion-to-find-out-all-possible-chess-knights-movements-using-minimax-algorithm/
Eric Steele joins Sean Devine to discuss @dhh’s RailsConf 2015 keynote on episode 189 of the Ruby on Rails Podcast on 5by5.
Full code and tutorial. Build a simple SMS voting system that you can use at events, meetups, and more. Uses Sinch SMS to receive responses, Ruby for the backend, and Chartist to display the results as a nice looking graph. Try the tutorial here.
The fig-leaf gem from Avdi Grimm’s Objects causes ActiveRecord’s methods to be treated as a private interface. In this post, I apply this approach to a production Rails app and describe the advantages is provides, and as well as some of the challenges encountered.
Example of handling RabbitMQ publisher failures for your publishing app, an example, when you experience a connection problem because broker(RabbitMQ) for any reason is down, you need to handle this case because the bunny is synchronous and your app may get stuck. http://warolv.net/blog/2015/05/01/handling-rabbitmq-publisher-failures/
Ruby hashes are awesome! Here’s how to do FizzBuzz without a single If statement. Declarative style programming saves of the day :)
A few weeks ago, I published the post, a comparison of two platforms – Heroku and Shelly Cloud. Today I would like to share my results of a similar test: Digital Ocean against Shelly Cloud. [more inside]
When the method is supposed to change a record but your test doesn’t show it. http://6ftdan.com/allyourdev/2015/04/30/have-problems-testing-methods-that-query-activerecord/
RethinkDB is the open-source database for the realtime web and it can push JSON to your app in realtime. I checked if I could get it to work with React.JS ans ActionController::Live to get real time updates of a webpage. You can read about it in On my radar: RethinkDB + React.js + Rails blogpost and watch 20s demo . Enjoy!
I think push updates are a great way to improve web applications. But Action Cable should be not as tightly integrated into Ruby on Rails 5 as it currently seems. It should provide an interface like Active Job and Action Mailer already do.