473,413 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

Error of "undefined method `each' for #<Pictograph:0x927dea0>"

47
hi all,

I have an error "undefined method `each' for #<Picture:0x927dea0>"
what is that mean?

in my view
Expand|Select|Wrap|Line Numbers
  1.  
  2. <% @user.each do |p| %>
  3. <%= p.image %>
  4. <% end %>
  5.  
  6.  

in controller
Expand|Select|Wrap|Line Numbers
  1.            @user=picture.all(
  2.          :joins => :culture,
  3.                   :conditions => (Album.joins(:description))).first 
  4.  
  5.  

plz give me some advance
Jun 10 '11 #1
1 2880
Markus
6,050 Expert 4TB
Using the .first method leaves you with a single Picture object, not an array of objects.
Jun 18 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Kakaiya | last post by:
Error message: An unhandled exception of type 'System.InvalidCastException' occurred in test.dll Additional information: Specified cast is not valid. Public Class Form1 Inherits...
1
by: | last post by:
A friend of mine has a website that is ASP. I know nothing about ASP. He switched hosting and now his "contact us" form does not work. When you hit submit it gives an error "Error 405 Method not...
0
by: John Phelan | last post by:
I have created a front-end application and back-end database. Everytime that I opened the program in the past, it open just fine with no errors when linking to the back-end tables. lately, I get...
0
by: John Phelan Cummings | last post by:
I have created a front-end application and back-end database. Everytime that I opened the program in the past, it open just fine with no errors when linking to the back-end tables. Lately, I...
4
by: John Phelan | last post by:
I have created a front-end application and back-end database. I have code that automatically links the front-end application to the back-end database for whenever I provide a patch or upgrade....
3
by: Steve Young | last post by:
I am trying to use the webclient class in VB.Net ... in particular I want to upload a file to the web server using: dim responseArray As Byte() = myWebClient.UploadFile(uri,"POST",filename) ...
2
by: Lauren Wilson | last post by:
Hi folks, I have an Access 2003 app that works perfectly on my computer. However, when we install it on OTHER computers that ALSO have access 2003 we get an error on startup: Error:...
0
by: John | last post by:
Hi, I am getting this error message The remote server returned an error: (405) Method Not Allowed. while trying to execute the following code: Dim myReq As HttpWebRequest =...
1
by: agwilli | last post by:
Recently installed MS Office Access 2003 Developer Extensions and when I use the Custom Startup Wizard to create the template and batch file, I get the following error message: Error 3045 -...
4
by: ielamrani | last post by:
Hi, I am getting this error when I try to export to an excel sheet. When I click on a button to export the first time it's fine, I rename the exported excel sheet and I try to export it again and I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.