diff --git a/tracks/app/controllers/context_controller.rb b/tracks/app/controllers/context_controller.rb index 3e2c5ce7..97289d30 100644 --- a/tracks/app/controllers/context_controller.rb +++ b/tracks/app/controllers/context_controller.rb @@ -5,7 +5,7 @@ class ContextController < ApplicationController model :project scaffold :context before_filter :login_required - caches_action :list, :show + # caches_action :list, :show layout "standard" diff --git a/tracks/app/controllers/project_controller.rb b/tracks/app/controllers/project_controller.rb index dfbc9a75..5e058157 100644 --- a/tracks/app/controllers/project_controller.rb +++ b/tracks/app/controllers/project_controller.rb @@ -6,7 +6,7 @@ class ProjectController < ApplicationController scaffold :project before_filter :login_required - caches_action :list, :show + # caches_action :list, :show layout "standard" # Main method for listing projects diff --git a/tracks/app/controllers/todo_controller.rb b/tracks/app/controllers/todo_controller.rb index 02de0421..c9854c2e 100644 --- a/tracks/app/controllers/todo_controller.rb +++ b/tracks/app/controllers/todo_controller.rb @@ -4,7 +4,7 @@ class TodoController < ApplicationController model :context, :project before_filter :login_required - caches_action :list, :completed + # caches_action :list, :completed layout "standard" # Main method for listing tasks @@ -13,7 +13,8 @@ class TodoController < ApplicationController def list @page_title = "List tasks" @projects = Project.find_all - @places = Context.find_all( "hide=0", "id ASC") + @places = Context.find_all + @shown_places = Context.find_all( "hide=0", "id ASC") @hidden_places = Context.find_all( "hide=1") @done = Todo.find_all( "done=1", "completed DESC", 5 ) @count = Todo.count( "done=0" ) @@ -58,9 +59,9 @@ class TodoController < ApplicationController def edit @item = Todo.find(@params['id']) @belongs = @item.project_id + @projects = Project.find_all + @places = Context.find_all @page_title = "Edit task: #{@item.description}" - @places = Context.find_all - @projects = Project.find_all end diff --git a/tracks/app/views/todo/list.rhtml b/tracks/app/views/todo/list.rhtml index 1c639769..ce7bccd7 100644 --- a/tracks/app/views/todo/list.rhtml +++ b/tracks/app/views/todo/list.rhtml @@ -1,9 +1,9 @@
-<% for @place in @places %> - <% @not_done = Todo.find_all( "done=0 AND context_id=#{@place.id}", "created ASC" ) %> +<% for @shown_place in @shown_places %> + <% @not_done = Todo.find_all( "done=0 AND context_id=#{@shown_place.id}", "created ASC" ) %> <% if !@not_done.empty? %>
-

<%= link_to( "#{@place.name.capitalize}", :controller => "context", :action => "show", :id => @place.id ) %>

+

<%= link_to( "#{@shown_place.name.capitalize}", :controller => "context", :action => "show", :id => @shown_place.id ) %>

<%= render_collection_of_partials "not_done", @not_done %>
diff --git a/tracks/config/environments/development.rb b/tracks/config/environments/development.rb index 83f0c0de..ffb8e956 100644 --- a/tracks/config/environments/development.rb +++ b/tracks/config/environments/development.rb @@ -2,4 +2,4 @@ Dependencies.mechanism = :load ActionController::Base.consider_all_requests_local = true BREAKPOINT_SERVER_PORT = 42531 -ActionController::Base.fragment_cache_store = ActionController::Caching::Fragments::FileStore.new("localhost") +ActionController::Base.fragment_cache_store = ActionController::Caching::Fragments::FileStore.new("/Users/jchappell/Sites/tracks/cache") \ No newline at end of file diff --git a/tracks/config/environments/production.rb b/tracks/config/environments/production.rb index 36b14d79..c8df714e 100644 --- a/tracks/config/environments/production.rb +++ b/tracks/config/environments/production.rb @@ -1,5 +1,5 @@ Dependencies.mechanism = :require ActionController::Base.consider_all_requests_local = false -ActionController::Base.fragment_cache_store = ActionController::Caching::Fragments::FileStore.new("localhost") +ActionController::Base.fragment_cache_store = ActionController::Caching::Fragments::FileStore.new("/Users/jchappell/Sites/tracks/cache") diff --git a/tracks/public/.htaccess b/tracks/public/.htaccess index 3da2844d..5dd8ecd6 100644 --- a/tracks/public/.htaccess +++ b/tracks/public/.htaccess @@ -7,7 +7,7 @@ Options +FollowSymLinks +ExecCGI RewriteEngine On # Change extension from .cgi to .fcgi to switch to FCGI and to .rb to switch to mod_ruby -RewriteBase /dispatch.cgi +RewriteBase /dispatch.fcgi # Enable this rewrite rule to point to the controller/action that should serve root. # RewriteRule ^$ /controller/action [R]