forked from fixin.me/fixin.me
Avoid refreshing whole index on create
This commit is contained in:
@@ -19,8 +19,8 @@ class UnitsController < ApplicationController
|
||||
def create
|
||||
@unit = current_user.units.new(unit_params)
|
||||
if @unit.save
|
||||
@before = @unit.successive
|
||||
flash.now[:notice] = t('.success', unit: @unit)
|
||||
run_and_render :index
|
||||
else
|
||||
render :new
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user