Gaspard, I noticed your program uses scopes to limit the returned
information. I'm running rails 2.3.4 and there seems to be an issue
with scopes and HABTM relationships: that they don't carry through.
I've tried using named scopes in my Product class like this:
class Product < ActiveRecord::
Gaspard Bucher wrote:
>
> We use something similar to filter objects in zena
> (http://bit.ly/2yjaVk). Basically, you need two things:
>
> 1. the visitor pattern (stored in Thread.current)
> 2. scoped finders
>
> I wrote an exemple of what you could use to filter fields:
> http://gist.github.
Marli Ba wrote:
> Hey I was wondering if anyone knows of a gem or plugin that can limit
> fields returned based on the User's role? I'm looking for something
> that will basically rewrite the find() method to limit the fields
> returned based on the User role.
>
> so,
>
> Admin:
> Product.all =
3 matches
Mail list logo