creating new record #1570

Closed
trbartel opened this Issue Jun 8, 2011 · 4 comments

Comments

Projects
None yet
2 participants
@trbartel

trbartel commented Jun 8, 2011

From my new form, the new record is not being added to the model after selecting f.submit. From the development log, I can see that the parameters for the new record are being passed, but then the new form gets re-rendered, which is what I have set up as an "else" to to my "if .... .save.
Seems to be its failing half way through the save process?

@dmathieu

This comment has been minimized.

Show comment
Hide comment
@dmathieu

dmathieu Jun 8, 2011

Contributor

You probably have failing validations in your form. Try displaying the errors.
You can also see them quickly by using #save! in your controller (just temporarily of course).

Contributor

dmathieu commented Jun 8, 2011

You probably have failing validations in your form. Try displaying the errors.
You can also see them quickly by using #save! in your controller (just temporarily of course).

@trbartel

This comment has been minimized.

Show comment
Hide comment
@trbartel

trbartel Jun 8, 2011

I removed all validations in the model's rb file...not sure if I'm using #save! properly...is that in place of .save ?

trbartel commented Jun 8, 2011

I removed all validations in the model's rb file...not sure if I'm using #save! properly...is that in place of .save ?

@trbartel

This comment has been minimized.

Show comment
Hide comment
@trbartel

trbartel Jun 8, 2011

Without the validations...my development log shows the INSERT INTO....thanks

trbartel commented Jun 8, 2011

Without the validations...my development log shows the INSERT INTO....thanks

@dmathieu

This comment has been minimized.

Show comment
Hide comment
@dmathieu

dmathieu Jun 8, 2011

Contributor

That's not a bug then. Could you close the issue ?

Contributor

dmathieu commented Jun 8, 2011

That's not a bug then. Could you close the issue ?

@trbartel trbartel closed this Jun 8, 2011

svenfuchs pushed a commit to svenfuchs/rails that referenced this issue Jul 2, 2011

STI should identify itself inside named_scope
[#1570 state:resovled]

Signed-off-by: José Valim <jose.valim@gmail.com>

svenfuchs pushed a commit to svenfuchs/rails that referenced this issue Jul 2, 2011

test for #1570
Signed-off-by: José Valim <jose.valim@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment