On 18 September 2011 02:25, gato pardo <[email protected]> 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

What happens if, in the rails console, you type
Pack.find 1

Paste the result here.
Also show us db/schema.rb

Colin
-- 
gplus.to/clanlaw

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