Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow strategy to be called on arbitrary classes #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Aug 19, 2016

  1. Allow strategy to be called on arbitrary classes

    Prior to this change, it attempt to use the hardcoded `Feature` class,
    whether or not it exists.
    
    So, when I attempted to namespace my Feature class I got the following
    error:
    
    ```
    NameError: uninitialized constant Flip::DatabaseStrategy::Feature
    /Users/jcoyne/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/flip-1.1.0/lib/flip/database_strategy.rb:5:in
    `initialize'
    /Users/jcoyne/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/flip-1.1.0/lib/flip/feature_set.rb:36:in
    `new'
    /Users/jcoyne/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/flip-1.1.0/lib/flip/feature_set.rb:36:in
    `add_strategy'
    /Users/jcoyne/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/flip-1.1.0/lib/flip/declarable.rb:15:in
    `strategy'
    /Users/jcoyne/workspace/curation_concerns/app/models/curation_concerns/feature.rb:6:in
    `<class:Feature>'
    ```
    jcoyne committed Aug 19, 2016
    Configuration menu
    Copy the full SHA
    69dcae7 View commit details
    Browse the repository at this point in the history