app/models/domain_term.rb in sufia-models-2.0.1 vs app/models/domain_term.rb in sufia-models-3.0.0
- old
+ new
@@ -1,18 +1,6 @@
-# Copyright © 2012 The Pennsylvania State University
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
class DomainTerm < ActiveRecord::Base
- attr_accessible :model, :term
+ attr_accessible :model, :term if Rails::VERSION::MAJOR == 3
+
+ # TODO we should add an index on this join table and remove the uniq query
has_and_belongs_to_many :local_authorities, :uniq=> true
end