app/controllers/domains_controller.rb in rmails-0.2.1 vs app/controllers/domains_controller.rb in rmails-0.2.2
- old
+ new
@@ -21,19 +21,19 @@
def create # JSON only
@domain = current_admin_user.build_domain(params[:virtual_domain])
if @domain.save
render :json => {:id => @domain.id}
else
- render :json => {:errors => @domain.errors.to_json}
+ render :json => {:errors => @domain.errors}
end
end
def update # JSON only
@domain = current_admin_user.domain(params[:id])
if @domain.update_attributes params[:virtual_domain]
render :json => {:id => @domain.id}
else
- render :json => {:errors => @domain.errors.to_json}
+ render :json => {:errors => @domain.errors}
end
rescue
render :status => 405
end