I am trying to populate a header on all pages by using
application_controller methods as in:
def show
populate_header
end
def new
populate_header
end
def create
populate_header
end
and the following methods in the various model controllers:
def create
super
hobo_create
end
def new
super
hobo_new
end
def show
super
hobo_show
end
The above work properly.
When I try to do the same for the edit page, I get various errors
application_controller:
def edit
populate_header
end
model controller:
def edit
super
hobo_edit ### doesn't exist
end
or
def edit
super ### renders empty page (goes to application_controller's edit)
end
What am I missing? I need to intercept the edit invocation before the
page is rendered, just like the show, create, new and index pages. Is
that possible? Something must be populating @this from the record being
edited, where is that done?
Thanks,
Don Z.
cheers,
Bryan
> --
> You received this message because you are subscribed to the Google Groups
> "Hobo Users" group.
> To post to this group, send email to hobo...@googlegroups.com.
> To unsubscribe from this group, send email to
> hobousers+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/hobousers?hl=en.
>
It works just like it should now.
Shouldn't this show up in the docs somewhere (I searched for hours)
since it is not quite obvious ;-) ?
Don Z.
--
You received this message because you are subscribed to the Google Groups "Hobo Users" group.
To post to this group, send email to hobo...@googlegroups.com.
To unsubscribe from this group, send email to hobousers+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.
So it was lying to you. It seems to me that in this case it's better
to change the code than the manual, so I did this:
https://github.com/tablatom/hobo/commit/fb95a84b4bae7a5ad923955ed92fc6272d63cc33
It's off in a development branch, so it won't help you yet, but it
should help the next guy to encounter the problem.
Bryan
Even thought I got it working, I will have enough additional instances
before the app is done that I am refactoring with Kevin's elegant
solution. (I keep forgetting that underlying hobo is the entire set of
RoR features).
For those of you to whom this applies, I hope all had a happy Thanksgiving,.
Don Z.