Mike Rose wrote: > and let me know if that solved the issue. It's really bad/wasteful to > pull down all of your artists. Also, shorthand
Yeah, that is what I meant by "long winded". *Why is there this issue with the name of a local, temporary variable?* If the scope is only a few lines, I might as well call it "x" (which is why I think tmp is *unambiguous*: it indicates this variable is just that, and nothing more than that)...Is this just the normal "pick informative names" caveat, or is there more to it? Rails is slightly scary... Your "where =" line did not work -- I may have mistyped it, but this seems to do: @albums = Album.find(:all, :conditions => { :artist_id => params[:find_id].to_i }) Most of all: Your help is much appreciated dude, THANKS! ps. If you have a minute, here's a little question about what I am about to try: I have a list on one side with all the artists. A click on a list entry will put all the artist's albums in a div box on the other side. Now, I want to add a menu up top with entries like "Sort albums by size", but I want that to apply only to the albums that are currently displayed. I don't want to produce the list again and sort it (since I have some more complicated plans, like allowing the user to build a custom list in the div box); I want to try and keep a global variable ($shown) and process that back in the album controller. Hopefully this is possible -- any related tips brought to mind? -- 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 rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---