Sha256: 1dcad386dbcb8f3107da31c33b88b2fac26ea41498efe0659d170497e65d07a1

Contents?: true

Size: 1011 Bytes

Versions: 4

Compression:

Stored size: 1011 Bytes

Contents

# Copyright (C) 2009  Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License version 2.1 as published by the Free Software Foundation.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

module ActiveGroonga
  module Associations
    class BelongsToAssociation < ActiveRecord::Associations::BelongsToAssociation
      def find_target
        @reflection.klass.find(@owner.id,
                               :readonly => @reflection.options[:readonly])
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
activegroonga-0.0.7 lib/active_groonga/associations/belongs_to_association.rb
activegroonga-0.0.6 lib/active_groonga/associations/belongs_to_association.rb
activegroonga-0.0.1 lib/active_groonga/associations/belongs_to_association.rb
activegroonga-0.0.2 lib/active_groonga/associations/belongs_to_association.rb