Thanks for the pointer.

Unfortunately I had to patch Hobo to make it work.  :(

Here's what I did in my controller:

  before_filter :find_filename, :only =>
[:show, :edit, :update, :destroy]

  def find_filename
    self.this = @downloaded_file = DownloadedFile.find_by_filename
(params[:id]+'.'+params[:format])
  end

The patch is here: 
http://groups.google.com/group/hobousers/web/hobo-diff-model-controller-this-passing.patch
(Do you prefer github, in-line patches or external patches, Tom)?

Note that this is perhaps not the best way to do things.  For example,
this patch gives hobo_destroy two different ways of passing in
"this".  However the way the patch is done allows the filter to work,
and seems like the least obtrusive way of doing it.  Do you have any
comments, Tom?

thanks,
Bryan


On Mar 4, 5:43 pm, davidmathers <[email protected]> wrote:
> On Mar 3, 11:39 am, Bryan Larsen <[email protected]> wrote:
>
>
>
> > Should I raise a bug, or am I missing something?
>
> You also need to put a find_by_filename finder in the controller since
> the default finder is trying to find by id.
>
> -david
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to