From 662e975c40cb380d884a4f44c06c29cc022c48af Mon Sep 17 00:00:00 2001 From: hukl Date: Thu, 19 Mar 2009 13:41:01 +0100 Subject: adding proper link --- app/models/occurrence.rb | 4 +++- app/views/layouts/application.html.erb | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/models/occurrence.rb b/app/models/occurrence.rb index 4a5f64a..a8e76a5 100644 --- a/app/models/occurrence.rb +++ b/app/models/occurrence.rb @@ -12,7 +12,9 @@ class Occurrence < ActiveRecord::Base def self.find_in_range start_time, end_time find( - :all, :conditions => [ + :all, + :include => :node, + :conditions => [ "start_time > ? AND end_time < ?", start_time, end_time ] ) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index e453bd7..72739cd 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -80,7 +80,7 @@ <% Occurrence.find_in_range(Time.now, (Time.now+14.days)).each do |occurrence| %>
  • <%= l occurrence.start_time.to_date, :format => :default %>
    - <%= occurrence.node.head.title %> + <%= link_to occurrence.node.head.title, occurrence.node.unique_name %>
  • <% end %> -- cgit v1.3