I always forget all those handy hints in Ruby on Rails, while using my Rails console. Here I will drop some very useful console commands to get some daily jobs done: Hint No.1 Sometimes we change the code in a file. In that case we can reload the changes in the rails console by using […]Read more at the source
As a consultant, I’ve looked over a shitload (how many? probably ~150-200) over the last 12 1/2 years in the Ruby on Rails community. I haven’t worked on most of them, but I do get invited to look over, review, audit, and provide feedback on a lot of those.
Over on the Planet Argon blog I’ve shared my quick hit list of a few initial things that I look for when looking over an existing code base.Read more at the source
The question is: how can we retrieve a owners class of a polymorphic association without loading the owner object into memory? Solution There are (at least) two ways to do this. First one is not recommended (as it might fail with multiple namespaces with same class names, etc: or a better one that will work […]Read more at the source
The 2016 Rails Hosting community survey results are in. One of the numbers that I’m tickled with joy about? 84% of Rails developers said they’d prefer to use PostgreSQL.
Check out all the survey results at http://rails-hosting.com/Read more at the source
If you get error like this one: it means that you use verion of Mysql with settings that does not support full Unicode. Changing that in Ruby on Rails should be fairly simple: However you might encounter following error: 767 bytes is the stated prefix limitation for InnoDB tables. To fix that you need to: […]Read more at the source
In this article, I’ll try to cover all the issues that I had, when I was upgrading one of my Rails app from Ruby on Rails 4.2 to Ruby on Rails 5.0. Note: This is not a complete, covering every possible case tutorial. You might encounter issues that I didn’t. If so, feel free to […]Read more at the source
David was kind enough to put together a demonstration of how to take advantage of Action Cable in Rails 5.
In the video he puts together a small chat application.Read more at the source
If you want to upload videos to rails application, and you wish to modify it on the fly, you archieve that by using FFMPEG.Read more at the source
Vagrant is a tool that allows you to create shareable and reproducible development environments.Read more at the source
Rails concerns are a really good way to provide shared functionalities into your models. For example you can add scopes and then apply them in multiple classes: One of the downsides of this solution is a “models pollution”. Every model in which we want to include our module, will get all the methods and scopes […]Read more at the source