diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/general_controller.rb | 5 | ||||
-rw-r--r-- | app/models/public_body_category.rb | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/app/controllers/general_controller.rb b/app/controllers/general_controller.rb index 438bbfd3f..380da285e 100644 --- a/app/controllers/general_controller.rb +++ b/app/controllers/general_controller.rb @@ -15,6 +15,11 @@ class GeneralController < ApplicationController def frontpage medium_cache @locale = self.locale_from_params() + successful_query = InfoRequestEvent.make_query_from_params( :latest_status => ['successful'] ) + @track_thing = TrackThing.create_track_for_search_query(successful_query) + @feed_autodetect = [ { :url => do_track_url(@track_thing, 'feed'), + :title => _('Successful requests'), + :has_json => true } ] end # Display blog entries diff --git a/app/models/public_body_category.rb b/app/models/public_body_category.rb index eeb2511fa..b88c683de 100644 --- a/app/models/public_body_category.rb +++ b/app/models/public_body_category.rb @@ -85,15 +85,15 @@ class PublicBodyCategory < ActiveRecord::Base attrs_with_values = attributes.select do |key, value| value != '' and key.to_s != 'locale' end - attrs_with_values.empty? + attrs_with_values.empty? end end PublicBodyCategory::Translation.class_eval do with_options :if => lambda { |t| !t.default_locale? && t.required_attribute_submitted? } do |required| - required.validates :title, :presence => { :message => _("Title can't be blank") } - required.validates :description, :presence => { :message => _("Description can't be blank") } + required.validates :title, :presence => { :message => "Title can't be blank" } + required.validates :description, :presence => { :message => "Description can't be blank" } end def default_locale? |