On Fri, Jul 24, 2009 at 6:44 AM, Joao Silva <
[email protected]> wrote:

>
> Joao Silva wrote:
> > From Message.ignored - all messages with ignored = false, others scopes
> > (message.all, message.positive, etc) - all messages with given rating
> > and ignored = true.
>
> Also: be default not showing records with ignored = true.


OK, I generated at ticket:

#2953<https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2953>

The easiest way to fix this for now is to remove the default_scope and
rewrite the positive, neutral, and negative named scopes as you see fit.
For example, if you would like positive, neutral, and negative named scopes
to have a ignored value set to true, you can do the following:

named_scope  :rating_type, lambda { |type| { :rating => type, :ignored =>
true } }

Usage:  Message.rating_type( 'positive' )
            Message.rating_type( 'neutral' )
            Message.rating_type( 'negative' )

Good luck,

-Conrad


>
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to