0

I am trying to write this:

post_view.id = 1

Comment.find(:all, :conditions => "post_parent_id = 'post_view.id'").size

The second statement does not work because that is not an appropriate way to write post_view.id .

Anyoone know the proper syntax?

1
  • 3
    Is post_view a pre-existing variable that you're not showing us? I don't understand the first line, or what you're trying to do. Comment.find(:all, :conditions => ["post_parent_id = ?", post_view.id]).size maybe? Commented Oct 23, 2010 at 17:48

1 Answer 1

1
post_view.id = 1
Comment.find(:all, :conditions => ["post_parent_id = ?", post_view.id]).size
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.