mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-21 22:54:09 +01:00
Coding style fixes
This commit is contained in:
parent
4fe600a916
commit
371f8d5adf
14 changed files with 132 additions and 179 deletions
|
|
@ -40,7 +40,7 @@ class ContextsController < ApplicationController
|
|||
@max_completed = current_user.prefs.show_number_completed
|
||||
@done = @context.todos.completed.limit(@max_completed).reorder(Arel.sql("todos.completed_at DESC, todos.created_at DESC")).includes(Todo::DEFAULT_INCLUDES)
|
||||
@not_done_todos = @context.todos.active_or_hidden.not_project_hidden.reorder(Arel.sql('todos.due IS NULL, todos.due ASC, todos.created_at ASC')).includes(Todo::DEFAULT_INCLUDES)
|
||||
@todos_without_project = @not_done_todos.select{ |t| t.project.nil? }
|
||||
@todos_without_project = @not_done_todos.select { |t| t.project.nil? }
|
||||
|
||||
@deferred_todos = @context.todos.deferred.includes(Todo::DEFAULT_INCLUDES)
|
||||
@pending_todos = @context.todos.pending.includes(Todo::DEFAULT_INCLUDES)
|
||||
|
|
@ -110,13 +110,13 @@ class ContextsController < ApplicationController
|
|||
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.xml {
|
||||
format.xml do
|
||||
if @saved
|
||||
render :xml => @context.to_xml(:except => :user_id)
|
||||
else
|
||||
render :body => "Error on update: #{@context.errors.full_messages.inject("") { |v, e| v + e + " " }}", :status => 409
|
||||
end
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -202,17 +202,17 @@ class ContextsController < ApplicationController
|
|||
@active_contexts = current_user.contexts.active
|
||||
@hidden_contexts = current_user.contexts.hidden
|
||||
@down_count = @active_contexts.size + @hidden_contexts.size
|
||||
cookies[:mobile_url]= { :value => request.fullpath, :secure => SITE_CONFIG['secure_cookies'] }
|
||||
cookies[:mobile_url] = { :value => request.fullpath, :secure => SITE_CONFIG['secure_cookies'] }
|
||||
render
|
||||
end
|
||||
end
|
||||
|
||||
def render_context_mobile
|
||||
lambda do
|
||||
@page_title = "TRACKS::List actions in "+@context.name
|
||||
@not_done = @not_done_todos.select {|t| t.context_id == @context.id }
|
||||
@page_title = "TRACKS::List actions in " + @context.name
|
||||
@not_done = @not_done_todos.select { |t| t.context_id == @context.id }
|
||||
@down_count = @not_done.size
|
||||
cookies[:mobile_url]= { :value => request.fullpath, :secure => SITE_CONFIG['secure_cookies'] }
|
||||
cookies[:mobile_url] = { :value => request.fullpath, :secure => SITE_CONFIG['secure_cookies'] }
|
||||
@mobile_from_context = @context.id
|
||||
render
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue