Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7916985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:59:39+00:00 2026-06-03T14:59:39+00:00

Im working with a multistep form (using Wicked gem). In the first couple steps

  • 0

Im working with a multistep form (using Wicked gem). In the first couple steps of the form i am editing the user model and those steps work fine.. Then I attempt the “interests” model which has a HABTM relationship with the user model. However i get this error:

ActiveModel::MassAssignmentSecurity::Error in UserStepsController#update

Can't mass-assign protected attributes: interest_ids
Rails.root: /Users/nelsonkeating/rails_projects/Oreminder1

Application Trace | Framework Trace | Full Trace
app/controllers/user_steps_controller.rb:12:in `update'

user_steps_controller.rb

 class UserStepsController < ApplicationController
  include Wicked::Wizard
  steps :standard, :personal, :interests, :dates 

 def show
   @user = current_user
   render_wizard
 end

 def update
  @user = current_user
  @user.attributes = params[:user]
 render_wizard @user
end

end

Heres the view:

<%= render layout: 'form' do |f| %>

<% for interest in Interest.find(:all) %>
 <label class="checkbox">
  <%= check_box_tag "user[interest_ids][]", interest.id, @user.interests.include?(interest) %>
  <%= interest.name %>
 </label>
<% end %>

<% end %>

Any ideas? Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T14:59:41+00:00Added an answer on June 3, 2026 at 2:59 pm

    You can get rid of this error by adding this to your user model:

    attr_accessible :interest_ids
    

    Without this the interest_ids attribute is protected against mass assignment and when you try to assign values to it anyway an exception is thrown.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the jQuery Form Wizard 3.0.4 plugin for a multistep registration process.
Working on a website that has Employee and Branch entities, using a database table
Working on my first Rails project, I used Ryan Bates' Nifty-Generators to create the
Working on a new app and using restful-authentication. I was trying to make it
Working sample using one Table SELECT t.* FROM ( SELECT TITLE.name, (TITLE.value-TITLE.msp) AS Lower,
Working example: http://alpha.jsfiddle.net/gTpWv/ Both of the methods work separately, but once regexp for smilies
I'm currently working on a multi-step query form which can be found at: http://jsfiddle.net/xSkgH/47/
I'm currently working on a multi-step query form which can be found at: http://jsfiddle.net/xSkgH/47/
I'm using ASP.NET MVC 3 code-first and I have added validation data annotations to
I'm using state_machine to build a multi-step form, with fields for each step validated

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.