Thursday, 28 June 2018
Wednesday, 6 June 2018
Devise form anywhere rails
Application controller:-
helper_method :resource_name, :resource, :devise_mapping, :resource_class
def resource_name
:user
end
def resource
@resource ||= User.new
end
def resource_class
User
end
def devise_mapping
@devise_mapping ||= Devise.mappings[:user]
end
helper_method :resource_name, :resource, :devise_mapping, :resource_class
def resource_name
:user
end
def resource
@resource ||= User.new
end
def resource_class
User
end
def devise_mapping
@devise_mapping ||= Devise.mappings[:user]
end
Subscribe to:
Posts (Atom)