I have in my model :dicts, :cards and :idioms. Each Dict has many Cards
and each Cards has many Idioms. Also, :idioms has an Integer column
:kind.
I would like to find out, whether a certain dict object has at least
one Card which has at least one Idiom where :kind has a certain value.
This is
Hello to everybody!
I have the following code in new.html.erb allowing a user to
select more questions (item) for creating a questionnaire:
...
% for item in @itemss %
%= check_box_tag questionnaire[item_ids][], item.id,
@questionnaire.items.include?(item) %
a %=
use jquery and bind click event to some calculcation function. you can set some
value or metadata to count with
eg
= check_box_tag 'name', value, checked?, :'data-count' = 123, :class = 'sums'
and you jquery
var result; // global variable
jQuery('.sums').each(function() {
Rails 3
---
I have a relationship where Category has_and_belongs_to_many Article. I
want to grab a small subsection of articles related to a particular
category. When I try to iterate over these, Rails tries to count the
records and gets the wrong number.
The issue is that there is bug in
I've made a survey in Rails where I want people to pick three words,
characteristics for different personality types, from a list of 30 words
for 20 different visual
details such as linear, organic, symmetry, etc.
I save each answer for each user, with the visual detail in one column
and the
I have posts and comments, and I'd like to display the number of
comments each post has (and display 0 if none). In the index Posts
view, I display a list of posts and their authors using the below
partial. What I can't figure out is how to limit the comment count to
the post listing (my
I've got a load of users and they have adverts, such that a User has
many adverts and an Advert belongs to a user. I'm going to need to stop
users creating more than a certain number of adverts based on their
status. I've got things working ok but it's a bit inelegant as I'm doing
it with before
Hi
I'm sure I've read somewhere that you can count up in 'jumps' using
ruby?
I've got two times and I want to basically go up in 15 minute jumps
without using the whole for loop thing.
Any helpful ideas? All my ruby books are in storage and I can't find
anything on google ...but then I'm not
Hi,
I generate and download a cvs from my (HBX)stats-tool. The data is
campaign-history value for tracking the hisitory of campaigns
Campaign-history Orders
Direct 4
Direct~Direct 6
adwords2
adwords~direct~direct 4
organic12
I'm currently using eldorado forum which shows the users that are
currently logged on. I wanted to also add the number of guests that are
currently viewing the site.
What do you think is the best way to go about this and where should I
keep track of this number?
I'm thinking I would have to
Hi all,
Suppose you have two models -- one for Files and anther for Downloads
-- such that a file has_many = :downloads
If you wanted to get a count of the downloads for the current month
and the two previous months, is there a way to get that data from one
query? Something like:
11 matches
Mail list logo