On 20 September 2011 13:53, Mathew Vivek <[email protected]> wrote:
> this is the code
>
>
> @posts = Post.all(:include=>[:messages],:conditions => ["status in (?)
> ", [1,2,3,4,5,6,8,9]],:order => "messages.created_at DESC")
>
> plz check whether it is correct syntax??

That does not seem to have anything to do with your previous post.
Did you mean column rather than table in your previous post?  If so
then it would be better to explain rather than just ignoring this.

It is easier for you to check by trying it and see if it runs and if
it passes your automated tests.

I suggest adding a named scope to your model for this, then the
complexity of the code will be in the model not the controller.

Colin
-- 
gplus.to/clanlaw

-- 
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.

Reply via email to