Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Ability to pass an arguments hash to the materialize class method #6

merged 1 commit into from

2 participants


Firstly, thanks for your great gem!

We're using Faceted in a project that doesn't use a classical ORM that supports methods such as 'where', etc. and thus we call the materialize method straight from our controller, as in:


and want to be also be able to pass in an 'excludes' hash, as you currently allow when simply creating a new presenter. So, we'd like to be able to do something like this:

Musician.materialize(results, :excludes => [:id])

This pull request allows the passing of such an argument hash.


@CoralineAda CoralineAda merged commit 3bab786 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 12, 2013
  1. @jaywengrow

    give the ability to pass args hash to materialize which allows for th…

    jaywengrow authored
    …e option of having presenters not present id
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/faceted/model.rb
4 lib/faceted/model.rb
@@ -44,9 +44,9 @@ def fields
@fields ||= [:id, :excludes]
- def materialize(objects=[])
+ def materialize(objects=[], args={})
objects.compact.inject([]) do |a, object|
- interface =
+ interface =
interface.send(:object=, object)
a << interface
Something went wrong with that request. Please try again.