uses subclasses method instead of get_subclasses

* removes get_subclasses
* subclasses is now public
pull/1186/head
Jens Ulferts 12 years ago committed by Martin Czuchra
parent 7eb5387f3c
commit 7d174fed9f
  1. 8
      app/models/enumeration.rb
  2. 2
      app/views/enumerations/list.html.erb

@ -86,14 +86,6 @@ class Enumeration < ActiveRecord::Base
def to_s; name end
# Returns the Subclasses of Enumeration. Each Subclass needs to be
# required in development mode.
#
# Note: subclasses is protected in ActiveRecord
def self.get_subclasses
@@subclasses[Enumeration]
end
# Does the +new+ Hash override the previous Enumeration?
def self.overridding_change?(new, previous)
if (same_active_state?(new['active'], previous.active)) && same_custom_values?(new,previous)

@ -1,6 +1,6 @@
<h2><%=l(:label_enumerations)%></h2>
<% Enumeration.get_subclasses.each do |klass| %>
<% Enumeration.subclasses.each do |klass| %>
<h3><%= l(klass::OptionName) %></h3>
<% enumerations = klass.shared %>

Loading…
Cancel
Save