diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/application_helper.rb | 10 | ||||
-rw-r--r-- | app/models/info_request.rb | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 6f002e4a2..9c4c085dd 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -4,7 +4,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: application_helper.rb,v 1.8 2007-10-24 19:13:06 francis Exp $ +# $Id: application_helper.rb,v 1.9 2007-10-30 15:03:03 francis Exp $ module ApplicationHelper @@ -39,15 +39,17 @@ module ApplicationHelper return date.strftime("%e %B %Y") end + # Simplified links to our objects + def request_link(info_request) - link_to h(info_request.title), request_url(:id => info_request) + link_to h(info_request.title), show_request_url(:id => info_request) end def public_body_link_short(public_body) - link_to h(public_body.short_name), public_body_url(:short_name => public_body.short_name) + link_to h(public_body.short_name), show_public_body_url(:short_name => public_body.short_name) end def public_body_link(public_body) - link_to h(public_body.name), public_body_url(:short_name => public_body.short_name) + link_to h(public_body.name), show_public_body_url(:short_name => public_body.short_name) end def user_link(user) diff --git a/app/models/info_request.rb b/app/models/info_request.rb index 4752a396f..7261978da 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -4,7 +4,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: info_request.rb,v 1.8 2007-10-29 18:11:34 francis Exp $ +# $Id: info_request.rb,v 1.9 2007-10-30 15:03:03 francis Exp $ require 'digest/sha1' @@ -12,7 +12,7 @@ class InfoRequest < ActiveRecord::Base validates_presence_of :title belongs_to :user - validates_presence_of :user_id + #validates_presence_of :user_id # breaks during construction of new ones :( belongs_to :public_body validates_presence_of :public_body_id |