model_router.rb:176:in `owner_routes': Hob routing error -- can't find
reverse association for Archive#workspace (e.g. the :has_many that
corresponds to a :belongs_to) (HoboError)
From searching the archives, the solution each time was to correct
errors in the association itself. In my case, I can't find what I did
wrong. At the same time, it used to work. This is the association
that used to be valid:
archive.rb
belongs_to :workspace
workspace.rb
has_many :archives, :foreign_key =>
"workspace_id"
In archive_controller.rb :
auto_actions :all, :except => :index
auto_actions_for :workspace, [:new]
I tried adding the FK to the archive.rb belongs_to half, but it didn't
help. I also tried downgrading to rails 2.2.2, but got the same error.
Does anyone know what I did wrong?
Thanks!
Really weird - I can't see anything that would be causing problems. Is
there a particular reason why you're specifying :foreign_key
on :archives? The value you're passing is the same as what Rails would
select by default.
--Matt Jones
Matt: I put the FK on archives because I was grasping at straws.
Here's where it gets REALLY weird. After migrating the DB I fired up
Webrick => same error. I decided to REALLY grasp at straws and
install Apache2 / Passenger [ to go with plain old ruby -- not REE ].
I was able to pull up the site just fine with Apache after that. For
giggles, I commented out the accessible => true part, and it still
loads with Apache/Pass, but still not with Webrick. I was also able
to migrate the DB with it commented out. FWIW, I also recently did
the tutorial, and found flakey results when I ran it with Webrick,
i.e. transient errors that prevented it from loading at all,
sometimes. I'm not sure what to make of all that, except to skip
webrick.
Now that I can pull up the site, I see that the auto_actions_for
declaration doesn't automatically give me the inline forms, i.e.
create a new archive for the workspace. I just got the h2 headline
and a save button, but no fields. From looking at the docs, I see
that the dependent => :destroy declaration is gone in favor or
viewHints. I erased the old and created the following file in a dir
called app/viewhints:
class WorkspaceHints < Hobo::ViewHints
children :playlist, :archive
end
I did the same for the other models. Still, no working in line forms.
Still just a headline and a save button. There's still ample room for
me to root through the docs on this. At the same time, I thought I'd
ask if you have any hints?
Thanks for the help! Paul
--
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.
99% sure that the things declared in 'children' need to match the
associations on Workspace - so :playlists, :archives
--Matt Jones
Also note that if you want an inline form, you'll need to have an
auto_actions_for declaration like this:
auto_actions_for :workspace, [:create]
as the code in pages.dryml.erb is looking for a missing
new_for_workspace and a present create_for_workspace; having the :new
auto-action will yield a link instead.
--Matt Jones
Matt: thanks for the tips.
Owen: I'm getting with the times. Here's the gist w/ the relevant
model / controller bits. Also the tags and output.
What it should [ used to ] do is create a form that enables a user to
add a video [ playlistItem] to his playlist. The actual generated
form leaves the field set blank, making it impossible to select from
the available videos. I seem to remember it populated a select box
with video.title displayed -- I'm not sure how it got that from
"video" as the only field-list item.
Thanks! Paul
--
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.
--
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.
http://screencast.com/t/ZWYxMTA2MG
I think a use case explaining the intended flow would be useful to
all...
-Owen
> > hobousers+...@googlegroups.com<hobousers%2Bunsu...@googlegroups.com>
Note I didn't use any view hints, and the associated name for the
Playlistitem class is the table playlistitems.
Not sure if this is what you were looking for.
-
I setup the app so that you can see it at: http://gnostic.dnsdojo.com:8080/
You can login with user: admin pwd: password
On the frontpage, click on the link in the middle that says "go to my
workspace." Hopefully, it won't blow up.
Background:
About a year ago, a friend of mine was working on a project. I used
his docs to create a demo. His project was aimed at stroke survivors
that needed to recover their speech. He had access to content that
essentially showed closeups of peoples lips as they said certain
phrases. The idea is to enable them to re-connect the sound with the
lip movements that make that sound. A big part of the project was to
help people that had run out of savings and insurance benefits --
therapy is otherwise expensive.
As I mentioned, it used to work. My motivation right now is to to show
it as a demo. I'd also like to get re-acquainted with hobo.
At the time, I was new to the concept of RIAs. I did it with iFrames
[ never again! ]. I'm thinking it may be easier to just use
form_assistant to crank out the forms.
Cheers!
At the moment, I'm just trying to get playlist and playlistItems
working. I was missing a couple of things from the example. First, I
didn't have accessible => true. Second, I was missing the has_many on
video. Sadly still no joy.
I'm gonna create a blank hobo app, and paste in pieces as I go. I'll
report back the results in a couple hours.
Thanks again!
Paul
On Jan 22, 3:34 am, Owen <od...@barquin.com> wrote: