Any favorite links for Ruby or Rails best practices?
Here's a few that come to mind:
I just went through the AirBnb one. So AWESOME!
Lots of good Ruby tips, such as using named capture groups rather than $1, $2.
/\$(?<dollars>\d+)\.(?<cents>\d+)/ =~ "$3.67" #=> 0
dollars #=> "3"
This is the only issue I've had so far with the AirBnb guide:
Just created a PR to my fork of the AirBnb Style guide, now the RailsOnMaui style guide:
I have two suggestions re: best practices for Rails:
1) read lots of code - see how others are doing it2) following the guidelines set out in "Growing Rails Applications In Practice"(see https://pragprog.com/book/d-kegrap/growing-rails-applications-in-practice)
GRAPI advocates a minimalistic coding style that relies on the object-oriented basics in Ruby to structure and organize your code. For me, this has made a world of difference.
This is useful:
It's a more concise, albeit less comprehensive version of the bbatsov Style Guide
Hello, I have trouble integrating react_on_rails with my ROR application but It's required ruby 2.3.0. How can I use react_on_rails gem with ruby 2.1.5 please help
@sankima Supposedly we work with Rails 3. If you really cannot make this work with Ruby 2.1.5, please post an issue to https://github.com/shakacode/react_on_rails.