Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CompaniesController < ApplicationController
- STORE = Company
- def new
- form = CRM.new_company_form
- render locals: { form: form }
- end
- def create
- status = CRM.create_company(params[:company], STORE)
- if status.success?
- redirect_to admin_companies_path, notice: "La empresa ha sido creado exitosamente."
- else
- render :new, locals: { form: status.form }
- end
- end
- end
Add Comment
Please, Sign In to add comment