Sha256: e8d80f65f2e9410188366ddf7e086286ab502f9b67876ca216d562740ef1757d

Contents?: true

Size: 481 Bytes

Versions: 26

Compression:

Stored size: 481 Bytes

Contents

# typed: strong
class FriendlyIdPlugin < SorbetRails::ModelPlugins::Base
  sig { override.params(root: Parlour::RbiGenerator::Namespace).void }
  def generate(root)
    return unless @model_class.singleton_class.included_modules.include?(::FriendlyId)

    # Friendly method definition
    # https://github.com/norman/friendly_id/blob/53f1ca01c5d9e71b62812028ff009fd138fd41b5/lib/friendly_id/base.rb#L216
    add_relation_query_method(
      root,
      'friendly'
    )
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
sorbet-rails-0.7.34 lib/sorbet-rails/gem_plugins/friendly_id_plugin.rb
sorbet-rails-0.7.33 lib/sorbet-rails/gem_plugins/friendly_id_plugin.rb
sorbet-rails-0.7.32 lib/sorbet-rails/gem_plugins/friendly_id_plugin.rb
sorbet-rails-0.7.31 lib/sorbet-rails/gem_plugins/friendly_id_plugin.rb
sorbet-rails-0.7.27 lib/sorbet-rails/gem_plugins/friendly_id_plugin.rb
sorbet-rails-0.7.26 lib/sorbet-rails/gem_plugins/friendly_id_plugin.rb
sorbet-rails-0.7.25 lib/sorbet-rails/gem_plugins/friendly_id_plugin.rb
sorbet-rails-0.7.24 lib/sorbet-rails/gem_plugins/friendly_id_plugin.rb
sorbet-rails-0.7.23 lib/sorbet-rails/gem_plugins/friendly_id_plugin.rb
sorbet-rails-0.7.22 lib/sorbet-rails/gem_plugins/friendly_id_plugin.rb
sorbet-rails-0.7.20 lib/sorbet-rails/gem_plugins/friendly_id_plugin.rb
sorbet-rails-0.7.19 lib/sorbet-rails/gem_plugins/friendly_id_plugin.rb
sorbet-rails-0.7.18 lib/sorbet-rails/gem_plugins/friendly_id_plugin.rb
sorbet-rails-0.7.5 lib/sorbet-rails/gem_plugins/friendly_id_plugin.rb
sorbet-rails-0.7.4 lib/sorbet-rails/gem_plugins/friendly_id_plugin.rb
sorbet-rails-0.7.3 lib/sorbet-rails/gem_plugins/friendly_id_plugin.rb
sorbet-rails-0.7.2 lib/sorbet-rails/gem_plugins/friendly_id_plugin.rb
sorbet-rails-0.7.1 lib/sorbet-rails/gem_plugins/friendly_id_plugin.rb
sorbet-rails-0.7.0 lib/sorbet-rails/gem_plugins/friendly_id_plugin.rb
sorbet-rails-0.6.5.1 lib/sorbet-rails/gem_plugins/friendly_id_plugin.rb