diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index e91c5060..87062876 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -40,7 +40,7 @@ class HomeController < ApplicationController unless @ordergroup.nil? - @ordergroup = Ordergroup.include_transaction_class_sum.find(@ordergroup) + @ordergroup = Ordergroup.include_transaction_class_sum.find(@ordergroup.id) if params['sort'] sort = case params['sort'] diff --git a/app/controllers/orders_controller.rb b/app/controllers/orders_controller.rb index c1c97b2b..038d7c62 100644 --- a/app/controllers/orders_controller.rb +++ b/app/controllers/orders_controller.rb @@ -94,7 +94,7 @@ class OrdersController < ApplicationController # Update an existing order. def update @order = Order.find params[:id] - if @order.update_attributes params[:order] + if @order.update_attributes params[:order].merge(updated_by: current_user) flash[:notice] = I18n.t('orders.update.notice') redirect_to :action => 'show', :id => @order else diff --git a/app/controllers/styles_controller.rb b/app/controllers/styles_controller.rb index 22d4c330..fe45d316 100644 --- a/app/controllers/styles_controller.rb +++ b/app/controllers/styles_controller.rb @@ -9,10 +9,10 @@ class StylesController < ApplicationController def foodcoop css = FoodsoftConfig[:custom_css] if css.blank? - render text: nil, content_type: 'text/css', status: 404 + render body: nil, content_type: 'text/css', status: 404 else expires_in 1.week, public:true if params[:md5].present? - render text: css, content_type: 'text/css' + render body: css, content_type: 'text/css' end end end diff --git a/plugins/polls/app/controllers/polls_controller.rb b/plugins/polls/app/controllers/polls_controller.rb index 4efeb1f8..90811a36 100644 --- a/plugins/polls/app/controllers/polls_controller.rb +++ b/plugins/polls/app/controllers/polls_controller.rb @@ -1,5 +1,5 @@ class PollsController < ApplicationController - before_filter -> { require_plugin_enabled FoodsoftPolls } + before_action -> { require_plugin_enabled FoodsoftPolls } def index @polls = Poll.page(params[:page]).per(@per_page).order(created_at: :desc)