adopt-a-hydrant/app/controllers/users_controller.rb

19 lines
349 B
Ruby
Raw Normal View History

2011-03-06 18:28:00 +00:00
class UsersController < Devise::RegistrationsController
respond_to :json
def create
build_resource
if resource.save
if resource.active?
sign_in(resource_name, resource)
else
expire_session_data_after_sign_in!
end
else
clean_up_passwords(resource)
end
respond_with resource
end
end