app/controllers/cadenero/v1/accounts_controller.rb in cadenero-0.0.2.a vs app/controllers/cadenero/v1/accounts_controller.rb in cadenero-0.0.2.a1
- old
+ new
@@ -1,9 +1,13 @@
require_dependency "cadenero/application_controller"
module Cadenero
module V1
class AccountsController < Cadenero::ApplicationController
+ def new
+ errors = %Q{Please sign up. posting the account json data as {account: { name: "Testy", subdomain: "test", owner_attributes: {email: "testy@example.com", password: "changeme", password_confirmation: "changeme"} }} to /v1/accounts/sign_up}
+ render json: {errors: errors, links: "/v1/accounts/sign_up"}, status: 422
+ end
def create
@account = Cadenero::V1::Account.create_with_owner(params[:account])
if @account.valid?
force_authentication!(@account.owner)
@account.create_schema