Sha256: 5043ba4c9247a9ebd2ca097e37a1092f5e9028a677e9b97f615cdfe989192f22

Contents?: true

Size: 1.02 KB

Versions: 1

Compression:

Stored size: 1.02 KB

Contents

# -*- ruby -*-
#
# Copyright (C) 2016  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 as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

namespace :groonga do
  desc "Synchronize Groonga database with model data"
  task :sync do
    Rails.application.eager_load!
    ObjectSpace.each_object(Class) do |klass|
      klass.sync if klass < Groonga::Client::Searcher
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
groonga-client-rails-0.9.1 lib/groonga/client/railties/groonga.rake