With your guidance, I have now seen named_scope work in my simple app by
invoking it in an action! Thanks!
Hassan Schroeder wrote:
On Wed, Aug 12, 2009 at 12:24 PM, kevin
leerails-mailing-l...@andreas-s.net wrote:
I have generated a simple event app to learn and try to debug
I have generated a simple event app to learn and try to debug
named_scope. But still have problem. My problem is still have not
figure out how to call the named_scope (i.e. Event.upcoming). Not
knowing exactly how, I tried to invoked it in various spots in the
controller and also the view
On Wed, Aug 12, 2009 at 12:24 PM, kevin
leerails-mailing-l...@andreas-s.net wrote:
I have generated a simple event app to learn and try to debug
named_scope. But still have problem. My problem is still have not
figure out how to call the named_scope (i.e. Event.upcoming).
Ex: named_scopes
I use ActiveScaffold in my project. I posted, perhaps stupidly, a
question on AS help forum on whether it supports named_scope and no one
replies for days now. I also could hardly find named_scope discussion
on that forum.
Hassan Schroeder wrote:
On Sun, Jul 26, 2009 at 7:02
On Wed, Jul 29, 2009 at 10:40 AM, kevin
leerails-mailing-l...@andreas-s.net wrote:
I use ActiveScaffold in my project. I posted, perhaps stupidly, a
question on AS help forum on whether it supports named_scope
I know zip about ActiveScaffold, but I imagine you would get more
useful help if
On Sun, Jul 26, 2009 at 7:02 PM, kevin
leerails-mailing-l...@andreas-s.net wrote:
I tweaked the sample code for my model and called MyModel.NameofScope
(i.e. Event.upcoming) in the model. To my surprise, it has no effect.
I also tried one or two other conditions. I looked at the log and
I tweaked the sample code for my model and called MyModel.NameofScope
(i.e. Event.upcoming) in the model. To my surprise, it has no effect.
I also tried one or two other conditions. I looked at the log and there
is nothing related to named_scope. I use fixtures to load data into the
Try this in your event model:
named_scope :upcoming, lambda { { :conditions = ['happens_at ?',
Time.now] } }
I've assumed that your scheduled date is named 'happens_at'; tweak as
needed.
--Matt Jones
On Jul 11, 4:05 pm, kevin lee rails-mailing-l...@andreas-s.net
wrote:
My app shows a list
8 matches
Mail list logo