diff --git a/app/views/licenses/_form.html.erb b/app/views/licenses/_form.html.erb index 9df124c..ea5c5e5 100644 --- a/app/views/licenses/_form.html.erb +++ b/app/views/licenses/_form.html.erb @@ -1,6 +1,6 @@ <%= error_messages_for :license %> -<%= form_for :license, @license do |f| %> +<%= form_for :license do |f| %> <%= hidden_field_tag(:license_id, params[:license_id]) %> <%= required labelled_form_field(_('Name'), f.text_field(:name)) %> <%= labelled_form_field(_('License url'), f.text_field(:url)) %> diff --git a/plugins/shopping_cart/controllers/shopping_cart_plugin_controller.rb b/plugins/shopping_cart/controllers/shopping_cart_plugin_controller.rb index 7b03be2..2c62084 100644 --- a/plugins/shopping_cart/controllers/shopping_cart_plugin_controller.rb +++ b/plugins/shopping_cart/controllers/shopping_cart_plugin_controller.rb @@ -94,6 +94,7 @@ class ShoppingCartPluginController < PublicController end def buy + @customer = user || Person.new if validate_cart_presence @cart = cart @enterprise = environment.enterprises.find(cart[:profile_id]) diff --git a/plugins/shopping_cart/views/shopping_cart_plugin/buy.html.erb b/plugins/shopping_cart/views/shopping_cart_plugin/buy.html.erb index e4ebb27..8b97cf5 100644 --- a/plugins/shopping_cart/views/shopping_cart_plugin/buy.html.erb +++ b/plugins/shopping_cart/views/shopping_cart_plugin/buy.html.erb @@ -1,6 +1,5 @@ -<% person = user.nil? ? Person.new : user %>