On Tue, Jun 21, 2011 at 8:05 AM, joanne ta <[email protected]> wrote:

>> def index
>>     @users= User.all
>>     @pic= []

You would probably have fewer problems if you observed the Rails
naming conventions;  e.g.

@pictures = []  # plural

@users.each do |user|
     @pictures << Picture.where(:phrase_id => :route , :culture_id
=>user.culture_id).first
end

@pictures.compact!

Now it's obvious that the next line makes no sense:

         send_data @pictures.image, :type => 'image/png', :disposition
=> 'inline'

An *array* of pictures doesn't have an "image" attribute.

HTH,
-- 
Hassan Schroeder ------------------------ [email protected]
http://about.me/hassanschroeder
twitter: @hassan

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