diff --git a/app/controllers/notes_controller.rb b/app/controllers/notes_controller.rb index 58c569ee..9fff8706 100644 --- a/app/controllers/notes_controller.rb +++ b/app/controllers/notes_controller.rb @@ -18,13 +18,7 @@ class NotesController < ApplicationController @page_title = "TRACKS::Note " + @note.id.to_s respond_to do |format| format.html - format.m &render_note_mobile - end - end - - def render_note_mobile - lambda do - render :action => 'note_mobile' + format.m { render :action => 'note_mobile' } end end @@ -49,16 +43,6 @@ class NotesController < ApplicationController end end - def destroy - @note = current_user.notes.find(params['id']) - @note.destroy - - respond_to do |format| - format.html - format.js { @down_count = current_user.notes.size } - end - end - def update @note = current_user.notes.find(params['id']) @note.attributes = params["note"] @@ -69,11 +53,20 @@ class NotesController < ApplicationController end end + def destroy + @note = current_user.notes.find(params['id']) + @note.destroy + + respond_to do |format| + format.html + format.js { @down_count = current_user.notes.size } + end + end + protected def set_source_view @source_view = params['_source_view'] || 'note' end - end diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index a698fb44..d2a09c7c 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -56,7 +56,7 @@ class ProjectsController < ApplicationController @next_project = current_user.projects.next_from(@project) @previous_project = current_user.projects.previous_from(@project) @default_tags = @project.default_tags - @new_note = current_user.notes.build + @new_note = current_user.notes.new @new_note.project_id = @project.id respond_to do |format| format.html diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2969a8b2..700548d0 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -104,11 +104,11 @@ module ApplicationHelper end def link_to_context(context, descriptor = sanitize(context.name)) - link_to( descriptor, context_path(context), :title => "View context: #{context.name}" ) + link_to( descriptor, context, :title => "View context: #{context.name}" ) end def link_to_project(project, descriptor = sanitize(project.name)) - link_to( descriptor, project_path(project), :title => "View project: #{project.name}" ) + link_to( descriptor, project, :title => "View project: #{project.name}" ) end def link_to_edit_project (project, descriptor = sanitize(project.name)) diff --git a/app/views/integrations/index.de.html.erb b/app/views/integrations/index.de.html.erb index 927bcf41..2eb83f5a 100644 --- a/app/views/integrations/index.de.html.erb +++ b/app/views/integrations/index.de.html.erb @@ -53,7 +53,7 @@
You do not have any context yet. The script will be available after you add your first context
@@ -98,6 +98,7 @@If Tracks is running on the same server as your mail server, you can use the integrated mail handler built into tracks. Steps to set it up: +
/PATH/TO/RUBY/ruby /PATH/TO/TRACKS/script/runner -e production 'MessageGateway.receive(STDIN.read)'
<%= integrations_url + "/google_gadget" %>
You do not have any context yet. The script will be available after you add your first context
@@ -98,6 +98,7 @@If Tracks is running on the same server as your mail server, you can use the integrated mail handler built into tracks. Steps to set it up: +
/PATH/TO/RUBY/ruby /PATH/TO/TRACKS/script/runner -e production 'MessageGateway.receive(STDIN.read)'
<%= integrations_url + "/google_gadget" %>