Permalink
Browse files

Merge commit 'ada9d710c76236d3ebaa49ab660232c50d94c0ec' into HEAD

  • Loading branch information...
2 parents d55b8f4 + ada9d71 commit 7205e17743a7bb7a7d6422b978958bcad975aa02 Jenkins committed May 9, 2012
Showing with 8 additions and 7 deletions.
  1. +3 −3 app/controllers/artefacts_controller.rb
  2. +5 −4 app/controllers/tags_controller.rb
View
6 app/controllers/artefacts_controller.rb
@@ -30,10 +30,10 @@ def create
def update
parameters_to_use = params[:artefact] || params.slice(*Artefact.fields.keys)
- save = @artefact.update_attributes(parameters_to_use)
- flash[:notice] = save ? 'Panopticon item updated' : 'Failed to save item'
+ saved = @artefact.update_attributes(parameters_to_use)
+ flash[:notice] = saved ? 'Panopticon item updated' : 'Failed to save item'
- if save and params[:commit] == 'Save and continue editing'
+ if saved && params[:commit] == 'Save and continue editing'
redirect_to edit_artefact_path(@artefact)
else
respond_with @artefact
View
9 app/controllers/tags_controller.rb
@@ -10,10 +10,11 @@ def index
def show
@tag = TagRepository.load(params[:id])
- if not @tag
- head :not_found and return
+ if @tag
+ respond_with(:status=>'ok', :tag => @tag)
+ else
+ head :not_found
end
- respond_with(:status=>'ok', :tag => @tag)
end
-end
+end

0 comments on commit 7205e17

Please sign in to comment.