mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 07:40:12 +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
|
prepend_before_filter :enable_mobile_content_negotiation
|
||||||
after_filter :set_charset
|
after_filter :set_charset
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
include ActionView::Helpers::TextHelper
|
include ActionView::Helpers::TextHelper
|
||||||
include ActionView::Helpers::SanitizeHelper
|
include ActionView::Helpers::SanitizeHelper
|
||||||
extend ActionView::Helpers::SanitizeHelper::ClassMethods
|
extend ActionView::Helpers::SanitizeHelper::ClassMethods
|
||||||
|
|
|
||||||
|
|
@ -175,7 +175,7 @@ class ProjectsController < ApplicationController
|
||||||
|
|
||||||
def order
|
def order
|
||||||
project_ids = params["list-active-projects"] || params["list-hidden-projects"] || params["list-completed-projects"]
|
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
|
render :nothing => true
|
||||||
rescue
|
rescue
|
||||||
notify :error, $!
|
notify :error, $!
|
||||||
|
|
|
||||||
|
|
@ -69,13 +69,11 @@ class RecurringTodosController < ApplicationController
|
||||||
params["recurring_todo"]["context_id"] = context.id
|
params["recurring_todo"]["context_id"] = context.id
|
||||||
end
|
end
|
||||||
|
|
||||||
params["recurring_todo"]["weekly_return_monday"]=' ' if params["recurring_todo"]["weekly_return_monday"].nil?
|
# make sure that we set weekly_return_xxx to empty (space) when they are
|
||||||
params["recurring_todo"]["weekly_return_tuesday"]=' ' if params["recurring_todo"]["weekly_return_tuesday"].nil?
|
# not checked (and thus not present in params["recurring_todo"])
|
||||||
params["recurring_todo"]["weekly_return_wednesday"]=' ' if params["recurring_todo"]["weekly_return_wednesday"].nil?
|
%w{"monday","tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"}.each do |day|
|
||||||
params["recurring_todo"]["weekly_return_thursday"]=' ' if params["recurring_todo"]["weekly_return_thursday"].nil?
|
params["recurring_todo"]["weekly_return_"+day]=' ' if params["recurring_todo"]["weekly_return_"+day].nil?
|
||||||
params["recurring_todo"]["weekly_return_friday"]=' ' if params["recurring_todo"]["weekly_return_friday"].nil?
|
end
|
||||||
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?
|
|
||||||
|
|
||||||
@saved = @recurring_todo.update_attributes params["recurring_todo"]
|
@saved = @recurring_todo.update_attributes params["recurring_todo"]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue