admin include in the project

 



step1


add the role column to user table

step2

in user.rb add this method

def is_admin?

self.role.try(:downcase) === 'admin'
end



step3:

add the admin folder and make controllers in that

step4:
add the controller path in the admin controllers

step5:
add the correct naming and code in the application controller in the admin this is very imp step






Comments

Popular posts from this blog

Rails 7 Features :: Comparison with Rails 6 and Rails 5