Browse files

Minor changes

  • Loading branch information...
1 parent a58cb26 commit c6b499b566e2ce9292b468aa6ab056bc8563122d @topfunky committed Sep 13, 2008
Showing with 4 additions and 9 deletions.
  1. +1 −1 app/controllers/application.rb
  2. +3 −8 app/controllers/notes_controller.rb
View
2 app/controllers/application.rb
@@ -16,7 +16,7 @@ class ApplicationController < ActionController::Base
protected
def database_name
- ["demo", "topfunky", Rails.env].join("_")
+ ["notes", "topfunky", Rails.env].join("_")
end
end
View
11 app/controllers/notes_controller.rb
@@ -47,14 +47,9 @@ def edit
def update
@note = Note.find(database_name, params[:id])
- if @note.save(params[:note])
- respond_to do |wants|
- wants.html { redirect_to note_url(@note) }
- end
- else
- respond_to do |wants|
- wants.html { render :action => "edit" }
- end
+ @note.save(params[:note])
+ respond_to do |wants|
+ wants.html { redirect_to note_url(@note) }
end
# Can also catch RestClient::RequestFailed for a 412 conflict
end

0 comments on commit c6b499b

Please sign in to comment.