Good Afternoon.

I am creating a time tracking application as learning exercise.
Each Project has_many Worktracks, each Worktrack has_many tasks, each
Proect has_many tasks through Worktracks.

Everything is great - model works, views work, controller functions.

Problem is, how can I have a single view incorporating Projects,
Worktracks and Tasks, allowing for creating Worktracks within Projects
(for example) - in one view.

I can do this in irb using '<<', but trying to translate this into
Rails is proving problematic. Searching this forum, I found a
Pragmatic book chapter, but the solution was complex and blew up my
app - undoubtedly, I erred somewhere trying to implement it, but I
cannot determine where, and at this point, my learning curve is
flatlined.

Any suggestions for general approach would be welcomed - my ideal
solution would be to be able to mix @project, @worktrack and @task all
in the same structure.

As a side-issue, but related, I have a valid_values table that I am
trying to use to populate drop-down menus within tasks, etc - but
again, I can only populate via direct coding in the view, rather than
passing in an array from database query. I know it can be done, but
the 'how' is defeating me. I suspect the solution is simple, but non-
obvious to me.

Many thanks in advance for suggestions, and I will accept flames in
good cheer if accompanied by workable suggestions.

--

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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to