Having problems committing.

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@9 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
bsag 2005-01-22 15:43:39 +00:00
parent 8428a4ade5
commit d7b1c6e167
11 changed files with 19 additions and 6 deletions

View file

@ -5,6 +5,7 @@ class ContextController < ApplicationController
model :project model :project
scaffold :context scaffold :context
before_filter :login_required before_filter :login_required
caches_action :list, :show
layout "standard" layout "standard"

View file

@ -4,6 +4,7 @@ class FeedController < ApplicationController
helper :feed helper :feed
model :todo, :context, :project model :todo, :context, :project
before_filter :login_required
def index def index
end end

View file

@ -6,6 +6,7 @@ class ProjectController < ApplicationController
scaffold :project scaffold :project
before_filter :login_required before_filter :login_required
caches_action :list, :show
layout "standard" layout "standard"
# Main method for listing projects # Main method for listing projects

View file

@ -6,6 +6,7 @@ class TodoController < ApplicationController
scaffold :todo scaffold :todo
before_filter :login_required before_filter :login_required
caches_action :list, :completed
layout "standard" layout "standard"
# Main method for listing tasks # Main method for listing tasks

View file

@ -7,7 +7,7 @@ class Todo < ActiveRecord::Base
# Notes must be < 60,000 bytes (65,000 actually, but I'm being cautious) # Notes must be < 60,000 bytes (65,000 actually, but I'm being cautious)
validates_presence_of :description, :message => "no description provided" validates_presence_of :description, :message => "no description provided"
validates_length_of :description, :maximum => 100, :message => "description is too long" 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" #validates_format_of :due, :with => /^[\d]{2,2}\/[\d]{2,2}\/[\d]{4,4}$/, :message => "date format incorrect"

View file

@ -1,5 +1,4 @@
<div id="display_box"> <div id="display_box">
<% for @place in @places %> <% for @place in @places %>
<% heading = false %> <% heading = false %>
@ -63,7 +62,6 @@
<% end %> <% end %>
</ul> </ul>
<h2>Add next action</h2> <h2>Add next action</h2>
<form method="post" action="add_item"> <form method="post" action="add_item">
<label for="new_item_description">Next action</label><br /> <label for="new_item_description">Next action</label><br />

View file

@ -1,5 +1,5 @@
RAILS_ROOT = File.dirname(__FILE__) + "/../" RAILS_ROOT = File.dirname(__FILE__) + "/../"
RAILS_ENV = ENV['RAILS_ENV'] || 'development' RAILS_ENV = ENV['RAILS_ENV'] || 'production'
# Mocks first. # Mocks first.

View file

@ -1,3 +1,5 @@
Dependencies.mechanism = :load Dependencies.mechanism = :load
ActionController::Base.consider_all_requests_local = true ActionController::Base.consider_all_requests_local = true
BREAKPOINT_SERVER_PORT = 42531 BREAKPOINT_SERVER_PORT = 42531
ActionController::Base.fragment_cache_store = ActionController::Caching::Fragments::MemoryStore.new

View file

@ -1,2 +1,5 @@
Dependencies.mechanism = :require Dependencies.mechanism = :require
ActionController::Base.consider_all_requests_local = false ActionController::Base.consider_all_requests_local = false
ActionController::Base.fragment_cache_store = ActionController::Caching::Fragments::MemoryStore.new

View file

@ -5,6 +5,12 @@
Main project site: <http://www.rousette.org.uk/projects/> Main project site: <http://www.rousette.org.uk/projects/>
Project wiki: <http://www.rousette.org.uk/projects/wiki/> Project wiki: <http://www.rousette.org.uk/projects/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 ## Version 1.01
A small increment to fix a few bugs and typographical errors in the README: A small increment to fix a few bugs and typographical errors in the README:

View file

@ -247,5 +247,5 @@ td {
} }
.odd_row { .odd_row {
background: #cbffff; background: #EDF3FE;
} }