diff --git a/tracks/app/controllers/context_controller.rb b/tracks/app/controllers/context_controller.rb index 3397ada9..3242e4c1 100644 --- a/tracks/app/controllers/context_controller.rb +++ b/tracks/app/controllers/context_controller.rb @@ -5,6 +5,7 @@ class ContextController < ApplicationController model :project scaffold :context before_filter :login_required + caches_action :list, :show layout "standard" diff --git a/tracks/app/controllers/feed_controller.rb b/tracks/app/controllers/feed_controller.rb index 1368a088..aa29c14f 100644 --- a/tracks/app/controllers/feed_controller.rb +++ b/tracks/app/controllers/feed_controller.rb @@ -4,6 +4,7 @@ class FeedController < ApplicationController helper :feed model :todo, :context, :project + before_filter :login_required def index end diff --git a/tracks/app/controllers/project_controller.rb b/tracks/app/controllers/project_controller.rb index be49725f..c48a01eb 100644 --- a/tracks/app/controllers/project_controller.rb +++ b/tracks/app/controllers/project_controller.rb @@ -6,6 +6,7 @@ class ProjectController < ApplicationController scaffold :project before_filter :login_required + 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 49f80558..6b1d59c0 100644 --- a/tracks/app/controllers/todo_controller.rb +++ b/tracks/app/controllers/todo_controller.rb @@ -6,6 +6,7 @@ class TodoController < ApplicationController scaffold :todo before_filter :login_required + caches_action :list, :completed layout "standard" # Main method for listing tasks diff --git a/tracks/app/models/todo.rb b/tracks/app/models/todo.rb index 831413f9..09e57c5e 100644 --- a/tracks/app/models/todo.rb +++ b/tracks/app/models/todo.rb @@ -7,7 +7,7 @@ class Todo < ActiveRecord::Base # Notes must be < 60,000 bytes (65,000 actually, but I'm being cautious) validates_presence_of :description, :message => "no description provided" validates_length_of :description, :maximum => 100, :message => "description is too long" - validates_lenght_of :notes, :maximum => 60000, :message => "notes are too long" + validates_length_of :notes, :maximum => 60000, :message => "notes are too long" #validates_format_of :due, :with => /^[\d]{2,2}\/[\d]{2,2}\/[\d]{4,4}$/, :message => "date format incorrect" diff --git a/tracks/app/views/todo/list.rhtml b/tracks/app/views/todo/list.rhtml index c31789ec..45a50142 100644 --- a/tracks/app/views/todo/list.rhtml +++ b/tracks/app/views/todo/list.rhtml @@ -1,5 +1,4 @@
- <% for @place in @places %> <% heading = false %> @@ -62,7 +61,6 @@ <%= puts "
  • #{event.startTime} - #{event.summary}
  • " %> <% end %> -

    Add next action

    diff --git a/tracks/config/environment.rb b/tracks/config/environment.rb index 554b4ea5..d7918be9 100644 --- a/tracks/config/environment.rb +++ b/tracks/config/environment.rb @@ -1,5 +1,5 @@ RAILS_ROOT = File.dirname(__FILE__) + "/../" -RAILS_ENV = ENV['RAILS_ENV'] || 'development' +RAILS_ENV = ENV['RAILS_ENV'] || 'production' # Mocks first. diff --git a/tracks/config/environments/development.rb b/tracks/config/environments/development.rb index 42a43d59..aff146de 100644 --- a/tracks/config/environments/development.rb +++ b/tracks/config/environments/development.rb @@ -1,3 +1,5 @@ Dependencies.mechanism = :load ActionController::Base.consider_all_requests_local = true -BREAKPOINT_SERVER_PORT = 42531 \ No newline at end of file +BREAKPOINT_SERVER_PORT = 42531 + +ActionController::Base.fragment_cache_store = ActionController::Caching::Fragments::MemoryStore.new diff --git a/tracks/config/environments/production.rb b/tracks/config/environments/production.rb index 2069ebcf..e4065d91 100644 --- a/tracks/config/environments/production.rb +++ b/tracks/config/environments/production.rb @@ -1,2 +1,5 @@ Dependencies.mechanism = :require ActionController::Base.consider_all_requests_local = false + +ActionController::Base.fragment_cache_store = ActionController::Caching::Fragments::MemoryStore.new + diff --git a/tracks/doc/CHANGENOTES.txt b/tracks/doc/CHANGENOTES.txt index e5626f27..dc6db308 100644 --- a/tracks/doc/CHANGENOTES.txt +++ b/tracks/doc/CHANGENOTES.txt @@ -5,6 +5,12 @@ Main project site: Project wiki: +## Version 1.02 + +1. Uses Rails 0.9.4.1 +2. Added validation for the entry fields. If you enter a bit of text that's too long or you omit the description (not much point in a blank next action!) you'll get an error message and the action won't be saved. +3. Added action caching. + ## Version 1.01 A small increment to fix a few bugs and typographical errors in the README: diff --git a/tracks/public/stylesheets/standard.css b/tracks/public/stylesheets/standard.css index b272e063..a7f25e1a 100644 --- a/tracks/public/stylesheets/standard.css +++ b/tracks/public/stylesheets/standard.css @@ -247,5 +247,5 @@ td { } .odd_row { - background: #cbffff; + background: #EDF3FE; } \ No newline at end of file