These are good starting points. Thanks! I don't actually need a true checkbox, so the button idea may be the way to go. I don't need multiple checks at once, just a way for the user to come back later in the day and see the list of all daily activities both completed and uncompleted that day. The deal is that each of these 12 (or so) activities get recycled each day, so it's not like a traditional To Do list (each day is a new day with a blank list). So my Activity model stays pretty static. And I don't think there is any need to record the "uncompleted" activities, hence the CompletedActivities model recording only the completed items by day.
I'm coming from an ASP background and am trying to get grounded in the MVC mindset, so it's coming slowly. I absolutely love what I see with Hobo but am finding the learning curve steep since I'm working on slightly more complex website ideas. r On Jan 13, 1:16 pm, kevinpfromnm <[email protected]> wrote: > Maybe instead of a checkbox a button that submits a hidden form? Or > if you're looking for multiple checks at once, have the create action > in the controller make the new models. > > On Jan 13, 8:46 am, Bryan Larsen <[email protected]> wrote: > > > > > I can't think of a way to do exactly what you want without writing > > Javascript and controller actions. However, there is a nice Hobo way of > > doing something similar. > > > <do part="completed"> > > <do if="&this.completed?">Completed</do> > > </do> > > <create-button model="Activity" params="&{:owner => current_user, > > :completed_activity => this, ...}" update="completed"/> > > > I'm going to post an Ajax manual page real soon now, which will help you > > fill out the pseudo-code above. > > > Bryan > > > polarshag wrote: > > > I have tinkered with both and > > > rails & hobo for a while now, but I'm > > > > still a noob. Not sure how to tackle this problem, any pointers would > > > be great: > > > > I have a set of daily activities (Activity Model) that I want a user > > > to be able to check off which of those they completed each day. So I > > > want to list all 12 Activities daily with a checkbox beside, so the > > > user can just check the box off when completed. This needs to add a > > > new record to my CompletedActivity model (belongs_to Activity, > > > belongs_to Owner). Not entirely sure where to start... any pointers?
-- 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.
