RedmineActsAsTaggableOn::RedminePluginPatch

Public Instance Methods

requires_acts_as_taggable_on() click to toggle source
# File lib/redmine_acts_as_taggable_on/redmine_plugin_patch.rb, line 2
def requires_acts_as_taggable_on
  @requires_acts_as_taggable_on = true
  if Redmine::VERSION::MAJOR < 2
    fail 'redmine_acts_as_taggable_on requires Redmine 2.x or higher.'
  end
end
requires_acts_as_taggable_on?() click to toggle source
# File lib/redmine_acts_as_taggable_on/redmine_plugin_patch.rb, line 9
def requires_acts_as_taggable_on?
  return true if @requires_acts_as_taggable_on

  # Safety net: If the plugin uses the acts-as-taggable-on gem the old way,
  # assume that it requires the tables.
  if File.exist?(gemfile_path)
    if File.read(gemfile_path).include? 'acts-as-taggable-on'
      warn_about_acts_as_taggable_on
      return true
    end
  end

  false
end
using_acts_as_taggable_on_tables?() click to toggle source
# File lib/redmine_acts_as_taggable_on/redmine_plugin_patch.rb, line 24
def using_acts_as_taggable_on_tables?
  return false unless requires_acts_as_taggable_on?
  return false if Redmine::Plugin::Migrator.current_version(self) == 0
  true
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.