-
is it something that the rails framework provides?
-
can it be changed to “current_car” – in this example, “car” being my object?
so, can I use the “current_” and append the name of my object???
is it something that the rails framework provides? can it be changed to current_car
Share
current_user is a method defined by many authentication frameworks which are available for Rails.
Devise is one of the most popular authentication frameworks but there are many others you can find.
The method current_user usually returns the current authenticated user if there is one, or nil otherwise.
Of course you can’t just replace the suffix of current_ with anything you’d like, it just won’t work.
I don’t see why you’d like to use current_car in your application but you can post it as a comment and I’ll try to help you figure out if it is needed and what alternatives there are.