I’ve successfully used:
@presentation = current_user.presentation
@presentation = current_user.create_presentation unless @presentation
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
The Specs db-table is built in the same way, containing the same
properties for default, not null?, unsigned?, Zerofil?. All which are
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.
What can be wrong?