1

I know that this may have been asked a lot, but the answers are fuzzy in somways... Basically what i wanna know in a direct way, it's how can i link my table key.tbl_ctrl_usuario with the devise gem...

Devise with rails 5

Adding devise gem to rails 4

These are the links that i check, but the answers i cannot understand completly...

I have my database in Postgresql and my table USER it's declared in this way

CREATE TABLE key.tbl_ctrl_usuario
(
  idusuario integer NOT NULL,
  nombreusuario character varying(150) NOT NULL,
  clave character varying(300) NOT NULL,
  rol character varying(50) NOT NULL,
  estado boolean NOT NULL DEFAULT false,
  CONSTRAINT tbl_ctrl_usuario_pkey PRIMARY KEY (idusuario),
  CONSTRAINT tbl_ctrl_usuario_idusuario_fkey FOREIGN KEY (idusuario)
      REFERENCES key.tbl_ctrl_empleados (idempleado) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION
)
WITH (
  OIDS=FALSE
);
ALTER TABLE key.tbl_ctrl_usuario
  OWNER TO postgres;
Luis Cardoza Bird
  • 1,265
  • 4
  • 24
  • 43

2 Answers2

0

You needs to add devise required columns in your table link email, password etc. for simplicity you can rename your table name to user check here how to rename migration and check out this link for generate devise with already created table.

Ajinath Jedhe
  • 152
  • 2
  • 15
0

Rename table to users on your migration. The existent user table contains the users of postgres. And you should use variables in english not spanish