473,698 Members | 2,271 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error of "undefined method `each' for #<Pictograph:0x 927dea0>"

47 New Member
hi all,

I have an error "undefined method `each' for #<Picture:0x927 dea0>"
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 2898
Markus
6,050 Recognized Expert Expert
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
3388
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 System.Windows.Forms.Form Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
1
2302
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 allowed" that "post" method is not allowed? I looked at the code which is: <form action="send_email.asp" method="post" onSubmit="return checkform();"> . Its there a file or application missing with the new hosting company? Any help would be greatly...
0
1434
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 the following error message whenever I open my application: ERROR: "Method 'Connection' of object '_Current Project' failed. Check to see if you installed the tables used for storing data is in the default directory. -2147024769
0
1477
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 get the following error message whenever I open my application: ERROR: "Method 'Connection' of object '_Current Project' failed. Check to see if you installed the tables used for storing data is in the default directory. -2147024769
4
3847
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. Everytime that I opened the program in the past using either Access 2002 and 2003, it open just fine with no errors when linking to the back-end tables. Lately, I get the following error message whenever I open my application:
3
4107
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) When I try this I get Error 405 - Method Not Allowed diagnostic message. I have searched the help files in .Net and cannot find reference to this error. Can someone point in the direction of a place where I can learn more about this error ... and...
2
4724
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: -2147467259 Method 'Visible' of object 'ComandBar' failed! At this point, I am stumped. Anyone have a clue why this is happening?
0
2916
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 = WebRequest.Create("http://127.0.0.1/virtualdirectory/")
1
2215
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 - Method 'CompactRepair' of object '_Application' failed - <dataroot> - <Error> <AppName>Custom Startup Wizard</AppName> <AppVersion>11.0.5622</AppVersion> <AppInstallLocation>C:\Program Files\Microsoft Office\ADE11\</AppInstallLocation> ...
4
15483
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 get the error: Runtime Error 1004: Method ‘Cells’ of Object ‘_Global’ failed It highlight this line: Range("A1:L1").Select sorry the code behind the button is long: . Dim stDocName As String stDocName = "QFinal4"
0
8604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9157
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8895
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8861
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4369
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2330
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.