Things you should avoid when you use Ruby on Rails

1. N+1 Query

2. Functions that are too ruby specific

3. Overriding Ruby/Rails native implementation

4. Too many instance variables inside controller

def popular_post
@cache_post||=Post.all.popular
end

5. User-defined field names

= simple_form_for @user do |f|
-f.object.user_defined_fields.each do |udf|
=f.input udf.to_sym
=f.button :submit

6. Hack the tools as permanent solution

7. Guess the use of less frequently used functions

--

--

--

Let's go invent tomorrow instead of worrying about what happened yesterday.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

TYCHKOWSKI: More celebrity fights we’d like to see

Kubernetes container orchestration commands and Interview questions and answers

Trias Weekly Report ( November 2nd, 2021 — November 8th, 2021)

Implementing a reliable library for currency conversion

(I tried planking for (5 minutes) every day for a month and it made my back feel great

RLS by roles in Power BI Service #taik18 #shorts #powerbishorts

Composer: Using your own local package

Not So Random Software #33 — Journaling and multi-armed bandit

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adam00

Adam00

Let's go invent tomorrow instead of worrying about what happened yesterday.

More from Medium

It’s 2022, is Learning Ruby on Rails Still Worth it?

Reverend Lovejoy saying “Short Answer — Yes, with an “if.”. Long Answer — No, With a “but.”.

BCrypt and Salt in Ruby: What’s happening?

Let’s upgrade to Rails 7

How to Implement Pagination in Rails