mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 15:50:13 +01:00
small cleanups
This commit is contained in:
parent
97f9a31d17
commit
b8fd942eb4
4 changed files with 534 additions and 538 deletions
|
|
@ -34,8 +34,6 @@ class ApplicationController < ActionController::Base
|
|||
prepend_before_filter :enable_mobile_content_negotiation
|
||||
after_filter :set_charset
|
||||
|
||||
|
||||
|
||||
include ActionView::Helpers::TextHelper
|
||||
include ActionView::Helpers::SanitizeHelper
|
||||
extend ActionView::Helpers::SanitizeHelper::ClassMethods
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ class ProjectsController < ApplicationController
|
|||
|
||||
def order
|
||||
project_ids = params["list-active-projects"] || params["list-hidden-projects"] || params["list-completed-projects"]
|
||||
projects = current_user.projects.update_positions( project_ids )
|
||||
@projects = current_user.projects.update_positions( project_ids )
|
||||
render :nothing => true
|
||||
rescue
|
||||
notify :error, $!
|
||||
|
|
|
|||
|
|
@ -69,13 +69,11 @@ class RecurringTodosController < ApplicationController
|
|||
params["recurring_todo"]["context_id"] = context.id
|
||||
end
|
||||
|
||||
params["recurring_todo"]["weekly_return_monday"]=' ' if params["recurring_todo"]["weekly_return_monday"].nil?
|
||||
params["recurring_todo"]["weekly_return_tuesday"]=' ' if params["recurring_todo"]["weekly_return_tuesday"].nil?
|
||||
params["recurring_todo"]["weekly_return_wednesday"]=' ' if params["recurring_todo"]["weekly_return_wednesday"].nil?
|
||||
params["recurring_todo"]["weekly_return_thursday"]=' ' if params["recurring_todo"]["weekly_return_thursday"].nil?
|
||||
params["recurring_todo"]["weekly_return_friday"]=' ' if params["recurring_todo"]["weekly_return_friday"].nil?
|
||||
params["recurring_todo"]["weekly_return_saturday"]=' ' if params["recurring_todo"]["weekly_return_saturday"].nil?
|
||||
params["recurring_todo"]["weekly_return_sunday"]=' ' if params["recurring_todo"]["weekly_return_sunday"].nil?
|
||||
# make sure that we set weekly_return_xxx to empty (space) when they are
|
||||
# not checked (and thus not present in params["recurring_todo"])
|
||||
%w{"monday","tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"}.each do |day|
|
||||
params["recurring_todo"]["weekly_return_"+day]=' ' if params["recurring_todo"]["weekly_return_"+day].nil?
|
||||
end
|
||||
|
||||
@saved = @recurring_todo.update_attributes params["recurring_todo"]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue