Skip to content
This repository has been archived by the owner on Oct 12, 2018. It is now read-only.

Commit

Permalink
Merge commit 'ada9d710c76236d3ebaa49ab660232c50d94c0ec' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins committed May 9, 2012
2 parents d55b8f4 + ada9d71 commit 7205e17
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions app/controllers/artefacts_controller.rb
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions app/controllers/tags_controller.rb
Expand Up @@ -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.