allow custom emit values for model views #42

Merged
merged 2 commits into from Sep 23, 2011

Projects

None yet

2 participants

@bterkuile
Contributor

This will allow easy setting of custom emit values in stead of just 1. Example:

class ICountForTwo
  view :for_method, :emit_value => :count
  view :with_value, :emit_value => 2
  def count
    2
  end
end

Specs run with:
Gems included by the bundle:

  • activemodel (3.0.9)
  • activesupport (3.0.9)
  • builder (2.1.2)
  • bundler (1.0.15)
  • couch_potato (0.5.7 8a5724e)
  • couchrest (1.1.2)
  • diff-lcs (1.1.2)
  • i18n (0.5.0)
  • json (1.5.3)
  • mime-types (1.16)
  • multi_json (1.0.3)
  • rake (0.9.2)
  • rest-client (1.6.3)
  • rspec (2.6.0)
  • rspec-core (2.6.4)
  • rspec-expectations (2.6.0)
  • rspec-mocks (2.6.0)
  • timecop (0.3.5)
  • tzinfo (0.3.29)
@langalex langalex merged commit 9d955f2 into langalex:master Sep 23, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment