On Jun 6, 5:05 pm, Jay Covington <[email protected]>
wrote:
> Frederick Cheung wrote:
> > On Jun 6, 3:59 pm, Jay Covington <[email protected]>
> > wrote:
>
> >> Still no luck. Is there a way to reference <%= table.item1 %> where
> >> BLANK is in the following code?:
>
> >> item_ids = 1..5
> >> statcount_query = item_ids.map{|id| "item#{id} = BLANK "}.join(" OR
> >> ")
> >> @statcount = table.count(:all, :conditions => statcount_query).to_s
>
> > What does your data look like ? count will always return either a
> > single number or a hash of values to counts (if you've used a :group
> > option) (to be quite precise, an instance of
> > ActiveSupport::OrderedHash which depending on the rails version you
> > have is backed by a different class).
>
> > Fred
>
> The data is simply a database of lists. For example, the list
> ("grocery") that contains: "title", "item1", "item2", "item3", "item4,
> "item5". It was built behind a scaffold. So the index.rhtml shows all of
> my lists. Ok, no problem there. Here is example output:
>
What I meant by that is what is the structure of your data (columns,
etables etc.)
Fred
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---