Creating a new record without uploading an image- paperclip

My users have the ability to upload a profile picture, but I don’t want
to require this upon registration.

I have a model called User, for auth and each User has_ one a Profile
The profiles model is where I’ve put my validation and keep the
information about the upload

When a new user is created, I also want to add a new record to the
profiles table,

such as

@user =[:user])
if @user.errors.empty?
self.current_user = @user

@profile = => @user.login, :user_id =>

if @profile.errors.empty?
  flash[:notice] = "Successfull"
  @errors = "Profile not created"
  render 'new'
flash[:notice]  =  "User not created fool"
redirect_to 'home'

The is causing the problem because with no avatar data on
registration, the validation on the profile model is failing.

How can set up paperclip so that if I’m creating a new record then those
validations are not required?

Unless you have explicitly validate for the presence of avatars, they
are not mandatory. So, check your model to see if you have specified
that. you can also check your table to see if you have marked those
fields as not null, if so change it to null.

let me know, how it goes.

Removing that validation did allow me to create a record in the Users
model. Thanks, I figured there was a reason it had to be there as most
documentation suggests that it should be there.