The form you are using is for when you are using a custom view. If you're using the standard Hobo view, you should let Hobo's controller methods set things up.
For example: def index hobo_index Todo.all end cheers, Bryan On Jan 31, 12:06 am, Dave Porter <[email protected]> wrote: > OK, I've started a simple To Do application, and it is very close to > Tom's recent screencast in Structure > ( as in Category - has_many todos & todos - belongs_to Category ) > > The only thing I have left to do to make it functional, is to somehow > dynamically switch the Todo's between showing ones that are: > Open (default) > Cancelled & Finalised > ( perhaps a drop down control, or three buttons!) > > I started out after reading this example in the dryml docs: > > def index > @adverts = Advert.published.all > end > "In other words you don’t need to do anything different than you would > in a normal Rails action. Hobo will look for either @advert (for > actions which expect an ID) or @adverts (for index actions) as the > initial context for a DRYML page." > > So I placed the following in the controller, but get an error > def index > @todos = Todo.all > end > The error being: > NoMethodError in TodosController#index > undefined method `total_pages' for #<Array:0x6408750> > > So any help much appreciated on a) why I'm getting the error & b) the > best way to handle this status requirement.. > > TIA, Dave Porter -- 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.
