Got it!... my bad...
hobo_show do
@eventtimes = this.event_times.where('event_times.start_date > ?',
Date.today, true)
end
works fine. Also added...
.paginate(:page => params[:page])
to this and it works a treat :)
Anthony.
On Monday, February 4, 2013 9:50:10 PM UTC, tonym wrote:
>
> Hi All,
> I've got pretty far with Hobo and loving it now. But just come across a
> frustrating problem I can't figure out...
>
> I have a show page, where the 'children' is a model that is associated
> 'through' another model.
> It works fine as a standard collection, but as soon as I try to query it
> in my controller I get the error:
>
> Cannot modify association 'Venue#event_times' because the source reflection
> class 'EventTime' is associated to 'Event' via :has_many.
>
>
> My show controller is:
>
> def show
> hobo_show do
> self.this.event_times
> = self.this.event_times.where("event_times.start_date > ?", Date.today)
> end
> end
> I've also tried:
>
> def show
> @collection = find_instance
> @eventlist = @collection.event_times
> @eventlist = @collection.event_times.where("event_times.start_date > ?",
> Date.today)
> hobo_show
> end
> Note that the 'event_times' are associated with the model *through* a
> model called 'events', and the events belong to 'venues' (this model).
>
> Any help would be greeeatly appreciated!
>
> Cheers, Anthony.
>
>
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.