Skip to content

Commit

Permalink
Removed some mysql dependencies. Closes #8
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiandeutsch committed Dec 3, 2009
1 parent e2fdc90 commit c2ff35d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/models/category.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Category < ActiveRecord::Base
named_scope :by_position, { :order => 'position ASC' }
named_scope :with_parent, lambda {|parent| {:conditions => ["parent_id = ?", parent.id ]} }
named_scope :short_navigation, :conditions => { :short_navigation => 1 }
named_scope :published, :conditions => '`categories`.`published` = 1'
named_scope :published, :conditions => ['`categories`.`published` = ?', true]
named_scope :in_navigation, :conditions => '`categories`.`hide_in_nav` IS NULL OR `categories`.`hide_in_nav` != 1'
named_scope :by_language, lambda { |language| { :conditions => { :language_id => language.id } } }

Expand Down
2 changes: 1 addition & 1 deletion app/models/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Document < ActiveRecord::Base
{:conditions => ["category_id IS NULL"]}
end
}
named_scope :published, :conditions => '`documents`.`published` = 1'
named_scope :published, :conditions => ['`documents`.`published` = ?', true]
named_scope :by_language, lambda { |language| { :conditions => { :language_id => language.id } } }

validates_presence_of :title
Expand Down
2 changes: 1 addition & 1 deletion app/models/language.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ class Language < ActiveRecord::Base
validates_presence_of :name, :message => 'Das Feld darf nicht leer sein'
validates_presence_of :iso2_code, :message => 'Das Feld darf nicht leer sein'

named_scope :published, { :conditions => ["published = '1'"] }
named_scope :published, { :conditions => ["published = ?", true] }
end

0 comments on commit c2ff35d

Please sign in to comment.