mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-11 15:12:37 +01:00
clean ups
This commit is contained in:
parent
b53fbc64dc
commit
36f007a087
6 changed files with 19 additions and 29 deletions
|
|
@ -13,6 +13,10 @@ class TodosController < ApplicationController
|
|||
|
||||
protect_from_forgery :except => :check_deferred
|
||||
|
||||
# these are needed for todo_feed_content. TODO: remove this view stuff from controller
|
||||
include ActionView::Helpers::SanitizeHelper
|
||||
extend ActionView::Helpers::SanitizeHelper::ClassMethods
|
||||
|
||||
def index
|
||||
@projects = current_user.projects.find(:all, :include => [:default_context])
|
||||
@contexts = current_user.contexts.find(:all)
|
||||
|
|
@ -981,6 +985,7 @@ class TodosController < ApplicationController
|
|||
end
|
||||
|
||||
def todo_feed_content
|
||||
# TODO: move view stuff into view, also the includes at the top
|
||||
lambda do |i|
|
||||
item_notes = sanitize(markdown( i.notes )) if i.notes?
|
||||
due = "<div>#{t('todos.feeds.due', :date => format_date(i.due))}</div>\n" if i.due?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue