Skip to content

Commit

Permalink
Attempting to fix locale issue
Browse files Browse the repository at this point in the history
  • Loading branch information
samlown committed Jan 22, 2010
1 parent e4d32da commit d5e7a28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Document < ActiveRecord::Base

named_scope :layout_is, lambda {|layout| {:conditions => ['documents.layout = ?', layout]}}

named_scope :for_current_locale, :conditions => ['documents.locale IS NULL OR documents.locale = ? OR documents.locale = ?', '', I18n.locale.to_s]
named_scope :for_current_locale, :conditions => ['(documents.locale IS NULL OR documents.locale = ?) OR documents.locale = ?', '', I18n.locale.to_s]

named_scope :ordered, :order => 'position ASC'

Expand Down
2 changes: 1 addition & 1 deletion app/views/themes/default/documents/blog/_show.atom.builder
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
children = @document.children.published.not_hidden.layout_is('blog_entry')
children = @document.children.published.for_current_locale.not_hidden.layout_is('blog_entry')
xml.feed(:xmlns => "http://www.w3.org/2005/Atom") do |feed|
xml.title @document.title
xml.summary RedCloth.new(@document.summary).to_html, :type => 'html'
Expand Down

0 comments on commit d5e7a28

Please sign in to comment.