removed code duplication

This commit is contained in:
Hauke Klement
2015-02-12 13:15:31 +01:00
parent c562d4b0ef
commit e8db4a4b10
3 changed files with 9 additions and 7 deletions

View File

@ -28,7 +28,6 @@ module CommonBehavior
format.html { render(options[:template]) }
format.json { render(json: @object.errors, status: :unprocessable_entity) }
end
private :respond_with_invalid_object
def respond_with_valid_object(format, options = {})
format.html { redirect_to(options[:path], notice: options[:notice]) }