Guest User

Untitled

a guest
Feb 24th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. class CompaniesController < ApplicationController
  2. STORE = Company
  3.  
  4. def new
  5. form = CRM.new_company_form
  6. render locals: { form: form }
  7. end
  8.  
  9. def create
  10. status = CRM.create_company(params[:company], STORE)
  11.  
  12. if status.success?
  13. redirect_to admin_companies_path, notice: "La empresa ha sido creado exitosamente."
  14. else
  15. render :new, locals: { form: status.form }
  16. end
  17. end
  18. end
Add Comment
Please, Sign In to add comment