Ruby on Rails Developer From Istanbul
I’m a computer engineer and also ruby on rails developer. This blog is generally about web development with ruby on rails, and some other things about web technologies.
When I must create a project with an admin panel, I need to do it fast and my choise for this purpose was rails’ scaffold generators. But I must add an
:admin namespace for all of my controllers for the admin panel. Rails’ default scaffold generator has not a feature like that. So I find a solution with rails admin scaffold gem. This gem is simply make a namespace for scaffold controllers and organize urls and paths accordingly.
Counter cache argument prevents you from making unnecessary
SELECT COUNT (*) requests.
We want to make unnecessary @course.users call for each course.
Next association is a basic example for
:has_many, :through association.