Skip to content

undefined method `marshal_dump' #88

@NehaPeer

Description

@NehaPeer

We use below ruby and rails version -

Ruby 2.7.3 Rails 6.1.3.2

While creating a new user it throws the below error -

#<NoMethodError: undefined method `marshal_dump' for #ActiveModel::Errors:0x00007fecf40576f0
Did you mean? marshal_load>

but id didnt use marshal_dump method anywhere in project

Below Create method defined in the controller -

def create

@user = User.new(user_params)

respond_to do |format|
if @user.save
format.html { redirect_to @user, notice: 'User successfully created.' }
format.json { render :show, status: :created, location: @user }
else
format.html { render :new }
format.json { render json: @user.errors, status: :unprocessable_entity }
end
end
end

private

def user_params
  params.require(:user).permit(:name, :email_id, :status)
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions