Sha256: b9ecc77b1a7b94153cc385e178d651b296cd98298dddec6d3e3504f4ca2f031e

Contents?: true

Size: 1000 Bytes

Versions: 10

Compression:

Stored size: 1000 Bytes

Contents

= FriendlyId::MethodScopes

{<img src="https://badge.fury.io/rb/friendly_id-method_scopes.svg" alt="Gem Version" />}[http://badge.fury.io/rb/friendly_id-method_scopes]
{<img src="https://travis-ci.org/gemvein/friendly_id-method_scopes.svg?branch=master" alt="Build Status" />}[https://travis-ci.org/gemvein/friendly_id-method_scopes]
{<img src="https://coveralls.io/repos/gemvein/friendly_id-method_scopes/badge.svg?branch=master" alt="Coverage Status" />}[https://coveralls.io/r/gemvein/friendly_id-method_scopes?branch=master]


FriendlyId Extension to allow method scopes, in addition to column and relationship scopes

== Installation

In your Gemfile:

    gem 'friendly_id'
    gem 'friendly_id-method_scopes'

== Usage

In your model:

    extend FriendlyId
    friendly_id :name, use: [:slugged, :method_scopes], scope_methods: :custom_method_name

    def custom_method_name
        # Code returning an array of eligible ids here
    end

== License

This project rocks and uses MIT-LICENSE.

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
friendly_id-method_scopes-0.3.7 README.rdoc
friendly_id-method_scopes-0.3.3 README.rdoc
friendly_id-method_scopes-0.3.2 README.rdoc
friendly_id-method_scopes-0.3.1 README.rdoc
friendly_id-method_scopes-0.3.0 README.rdoc
friendly_id-method_scopes-0.2.6 README.rdoc
friendly_id-method_scopes-0.2.5 README.rdoc
friendly_id-method_scopes-0.1.8 README.rdoc
friendly_id-method_scopes-0.1.7 README.rdoc
friendly_id-method_scopes-0.1.6 README.rdoc