diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-12-04 17:43:39 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-12-04 17:43:39 +0000 |
commit | 224921460a0a3d9c97813e4a64f0903adffff22f (patch) | |
tree | 76234577050b11dec0f6b79af2461b8e2359a199 /app/controllers/timelog_controller.rb | |
parent | 915748204965bb7f9704b55554e30f091934138e (diff) | |
download | redmine-224921460a0a3d9c97813e4a64f0903adffff22f.tar.gz redmine-224921460a0a3d9c97813e4a64f0903adffff22f.zip |
Adds a pseudo format to api template names and overrides ActionController#default_template so that api templates are chosen automatically.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4466 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/timelog_controller.rb')
-rw-r--r-- | app/controllers/timelog_controller.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/controllers/timelog_controller.rb b/app/controllers/timelog_controller.rb index 78d31490d..300b28f11 100644 --- a/app/controllers/timelog_controller.rb +++ b/app/controllers/timelog_controller.rb @@ -76,8 +76,6 @@ class TimelogController < ApplicationController :order => sort_clause, :limit => @entry_pages.items_per_page, :offset => @entry_pages.current.offset) - - render :template => 'timelog/index.apit' } format.atom { entries = TimeEntry.find(:all, @@ -103,7 +101,7 @@ class TimelogController < ApplicationController respond_to do |format| # TODO: Implement html response format.html { render :nothing => true, :status => 406 } - format.api { render :template => 'timelog/show.apit' } + format.api end end @@ -128,7 +126,7 @@ class TimelogController < ApplicationController flash[:notice] = l(:notice_successful_update) redirect_back_or_default :action => 'index', :project_id => @time_entry.project } - format.api { render :template => 'timelog/show.apit', :status => :created, :location => time_entry_url(@time_entry) } + format.api { render :action => 'show', :status => :created, :location => time_entry_url(@time_entry) } end else respond_to do |format| |