Navigation Menu

Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Commit

Permalink
simpler management of backward compatibility, per saturnflyer
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew vonderLuft committed Jan 1, 2010
1 parent 6b0b828 commit 5837d0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 5 additions & 2 deletions app/models/group.rb
@@ -1,6 +1,9 @@
class Group < ActiveRecord::Base
#named_scope :default, :order => "name"
default_scope :order => "name ASC"
unless self.respond_to?(:order_by)
default_scope :order => "name ASC"
else
order_by :name
end

belongs_to :created_by, :class_name => 'User', :foreign_key => 'created_by'
belongs_to :updated_by, :class_name => 'User', :foreign_key => 'updated_by'
Expand Down
3 changes: 1 addition & 2 deletions page_group_permissions_extension.rb
Expand Up @@ -33,8 +33,7 @@ def activate
Admin::PagesController.module_eval &PageControllerExtensions
UserActionObserver.instance.send :add_observer!, Group

# admin.tabs is deprecated with 0.9
if Radiant::Version.to_s >= "0.9.0"
if self.respond_to?(:tab)
add_tab "Settings" do
add_item "Groups", "/admin/groups", :after => "Users", :visibility => [:admin]
end
Expand Down

0 comments on commit 5837d0c

Please sign in to comment.