Hi!

It seems like the id variable is nil.
Could you check this?

Best Regards,
Everaldo

On Sat, Sep 17, 2011 at 10:25 PM, gato pardo wrote:

I have a simple project created around a very, very simple database: one
main table packs with just three rows
Column | Type |
Modifiers

--------+-----------------------------+----------------------------------------------------
id | integer | not null default
nextval('packs_id_seq'::regclass)
nombre | character varying(40) |
path | character varying(250) |

in a method I have :
id = params[:album].to_i
@album = Pack.find id
That is the sentence located using debugger. The answer in the browser:
ActiveRecord::StatementInvalid in FotosController#inic

PGError: ERROR: zero-length delimited identifier at or near """"
LINE 1: SELECT "packs".* FROM "packs" WHERE "packs"."" = $1 LIMIT ...
^
: SELECT "packs".* FROM "packs" WHERE "packs"."" = $1 LIMIT 1

It used to work with rails 2. What happened ?

Gato Pardo


--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 10 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedSep 18, '11 at 1:25a
activeSep 18, '11 at 2:12p
posts10
users3
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase