before in my code when creating a new user (in the users_controller) to
create an "empty" presentation table.
This does not work when I copy the above code and replace "presentation"
with "spec", even though there should be no other differances for
implementing it.
The Specs db-table is built in the same way, containing the same
properties for default, not null?, unsigned?, Zerofil?. All which are
empty.
My relations are right (as far as I can see)
User.rb "has_one :spec"
Spec.rb "belongs_to :user"
This is such a stupid error, forcing me to manually fill the Specs table
to get it to work.
before in my code when creating a new user (in the users_controller)
to
create an "empty" presentation table.
This does not work when I copy the above code and replace
"presentation"
with "spec", even though there should be no other differances for
implementing it.
Could there be validations on spec that are failing ?
This does not work when I copy the above code and replace
"presentation"
with "spec", even though there should be no other differances for
implementing it.
Could there be validations on spec that are failing ?
Fred
Yeah, Thanks Fred! You were absolutely right! I had a few validations
failing since the rows are empty. ;D
Removing the validations solves it, but I want to use the validations
later on when I update...So I kept them, is there any way to bypass the
validations once?
Could there be validations on spec that are failing ?
Fred
Yeah, Thanks Fred! You were absolutely right! I had a few validations
failing since the rows are empty. ;D
Removing the validations solves it, but I want to use the validations
later on when I update...So I kept them, is there any way to bypass
the
validations once?
You can set validations to run only on update (validates_foo :on
=> :update)