mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-17 20:58:09 +01:00
Merge branch 'master' into rails4
Conflicts: Gemfile.lock
This commit is contained in:
commit
d64f6e003e
5 changed files with 11 additions and 4 deletions
|
|
@ -127,7 +127,7 @@ GEM
|
||||||
activesupport (= 4.0.0.rc2)
|
activesupport (= 4.0.0.rc2)
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
thor (>= 0.18.1, < 2.0)
|
thor (>= 0.18.1, < 2.0)
|
||||||
rake (10.0.4)
|
rake (10.1.0)
|
||||||
ref (1.0.5)
|
ref (1.0.5)
|
||||||
rspec-expectations (2.13.0)
|
rspec-expectations (2.13.0)
|
||||||
diff-lcs (>= 1.1.3, < 2.0)
|
diff-lcs (>= 1.1.3, < 2.0)
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,10 @@ class RecurringTodosController < ApplicationController
|
||||||
p.attributes['end_date']=parse_date_per_user_prefs(p.attributes['end_date'])
|
p.attributes['end_date']=parse_date_per_user_prefs(p.attributes['end_date'])
|
||||||
p.attributes['start_from']=parse_date_per_user_prefs(p.attributes['start_from'])
|
p.attributes['start_from']=parse_date_per_user_prefs(p.attributes['start_from'])
|
||||||
|
|
||||||
@recurring_todo = current_user.recurring_todos.build(p.selector_attributes)
|
# make sure we set :recurring_period first, since other setters depend on it being set
|
||||||
|
# TODO: move logic into model
|
||||||
|
@recurring_todo = current_user.recurring_todos.build(:recurring_period => params[:recurring_period])
|
||||||
|
@recurring_todo.assign_attributes(p.selector_attributes)
|
||||||
@recurring_todo.update_attributes(p.attributes)
|
@recurring_todo.update_attributes(p.attributes)
|
||||||
|
|
||||||
if p.project_specified_by_name?
|
if p.project_specified_by_name?
|
||||||
|
|
|
||||||
|
|
@ -294,5 +294,9 @@ module ApplicationHelper
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def source_view_key
|
||||||
|
# uses @project.id or @context.id depending on source_view
|
||||||
|
source_view_is_one_of(:project, :context) ? "#{@source_view}-#{eval("@#{@source_view}.id")}" : @source_view
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
@not_done = @not_done_todos.select {|t| t.context_id == context.id }
|
@not_done = @not_done_todos.select {|t| t.context_id == context.id }
|
||||||
# invalidate the cache every day because of staleness or
|
# invalidate the cache every day because of staleness or
|
||||||
# rendering of "due in x days" that change without touching updated at of the todo
|
# rendering of "due in x days" that change without touching updated at of the todo
|
||||||
cache [context, @source_view, current_user.date.strftime("%Y%m%d"), @tag_name] do
|
cache [context, source_view_key, current_user.date.strftime("%Y%m%d"), @tag_name] do
|
||||||
-%>
|
-%>
|
||||||
<%=
|
<%=
|
||||||
render :partial => 'todos/collection',
|
render :partial => 'todos/collection',
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
@not_done = @not_done_todos.select {|t| t.project_id == project.id }
|
@not_done = @not_done_todos.select {|t| t.project_id == project.id }
|
||||||
# invalidate the cache every day because of staleness or
|
# invalidate the cache every day because of staleness or
|
||||||
# rendering of "due in x days" that change without touching updated at of the todo
|
# rendering of "due in x days" that change without touching updated at of the todo
|
||||||
cache [project, @source_view, current_user.date.strftime("%Y%m%d"), @tag_name] do
|
cache [project, source_view_key, current_user.date.strftime("%Y%m%d"), @tag_name] do
|
||||||
-%>
|
-%>
|
||||||
<%=
|
<%=
|
||||||
title = source_view_is(:project) ? t('projects.actions_in_project_title') : show_project_name(project)
|
title = source_view_is(:project) ? t('projects.actions_in_project_title') : show_project_name(project)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue