Thanks for a very helpful discussion, saved me loads of time.

Just wanted to comment on your session/flash code. You can use it, as
is, but replace session with params and that will, as far as I can
see, work perfectly regarding sort etc. Of course, as Ed mentioned, a
correctly placed before filter with a session should also do the job.
For my problem, using your dynamic condition code with params is an
excellent way to add custom searches to active scaffold with drop down
boxes etc.

-elfar

p.s. I am a rails newbie so I have no idea if this use of params has
any problematic side effects!!

On Aug 4, 9:57 pm, greghauptmann <[EMAIL PROTECTED]> wrote:
> arr..Thanks Ed!
>
> The penny finally dropped.  I think I was assuming I had to stick with
> the original approach 
> (i.e.http://wiki.activescaffold.com/wiki/published/Dynamic+conditions_for_...).
>
> So I've just added my "conditions for collection" URL parameter to my
> original link (which gives a filtered view) and pointed it to the
> normal "index" action (i.e. no new controller actions required), and
> then use this in my "def conditions_for_collection" method.   Seems to
> work fine.  If I click on the normal link for that model it doesn't
> have the parameter & goes back to unfiltered.  Much better than trying
> to use session.
>
> Thanks again for persisting
> Greg
>
> On Aug 4, 11:26 pm, Ed W <[EMAIL PROTECTED]> wrote:
>
> > greghauptmann wrote:
> > > ok....I'll have to print out the code base and start trying to
> > > understand it...see if I can't work out how to inject the
> > > "conditions_for_collection" parameters into the SORT url parameters
> > > like the SEARCH is currently doing...kinda feels like AS was a sports
> > > car I could just jump in and drive away, but to just work out how to
> > > change the radio station I've got to pull out the printed circuit
> > > board diagram and a multimeter  :)
>
> > Additional: I think AS will persist most URL params automatically anyway
> > - I use this for example to setup a filter on my site.  Again you are
> > probably using javascript updates hence you didn't inject your params
> > into the URL
>
> > This is not really an AS limitation - you just need to learn a little
> > more about how params are passed around  a stateless app environment
> > such as the web
>
> > Ed W
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to