Added a new action to the reminders controller.
I added a new method and view to my reminders controller to show completed items.
In Reminders Controller I added
@reminders = Reminder.find(:all, :conditions => [ "done = ? and user_id = ?", true, current_user.id])
I also added completed.html.erb to the views for reminders. However when I accessed the /reminders/completed url I got an error message.
ActiveRecord::RecordNotFound in RemindersController#show
WTF? Why is the error in show? Well after a half hour or cursing rails I figured it out.
In the routes.rb file you will see a line
What this does is add mappings for index, edit, create, show. With everything other then index, edit, create assigned to show.
You have to add a mapping for your new method to get around this.
map.connect 'reminders/completed', :controller => 'reminders', :action => 'completed'
Now you can try the completed method, and it will work.
Changed title, added Calendar control to created reminders.