Closed isaacfreeman closed 11 years ago
I think what is wrong is that the alias has a mistake in it.
alias_method :current_user, :current_admin
alias_method :signed_in?, :admin_signed_in?
was actually meant to be :
alias_method :current_admin, :current_user
alias_method :admin_signed_in?, :signed_in?
Breeze::Admin::AdminController uses alias_method to give convenient alternative names to the Devise methods current_admin and admin_signed_in?
This breaks for sites with Breeze Commerce, because AdminController gets loaded before Devise. THe alias shouldn't be evaluated before all modules are loaded.