> > >> 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. > > because i want to take a value "image" from Picture model what can i do ... I am really stuck now..
thanks Joanne -- 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. -- 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.

