Use cms page for signup

This commit is contained in:
2015-03-19 13:46:47 +01:00
parent 0ceabcdac3
commit d4594f65f8
4 changed files with 10 additions and 13 deletions
@@ -7,6 +7,8 @@ class NewSuppliersController < ApplicationController
def new
@new_supplier = NewSupplier.new
@new_supplier.current_employee = current_employee
@page = Page.find_by_name_and_locale('suppliers-signup', I18n.locale.to_s)
@page ||= Page.new(title: 'Signup as a restaurant')
end
def create
@@ -18,6 +20,8 @@ class NewSuppliersController < ApplicationController
session[:supplier_id] = @new_supplier.supplier.try(:id)
redirect_to supplier_root_path(anchor: '/pages/introduction')
else
@page = Page.find_by_name_and_locale('suppliers-signup', I18n.locale.to_s)
@page ||= Page.new(title: 'Signup as a restaurant')
render 'new'
end
end