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 8384237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:21:24+00:00 2026-06-09T17:21:24+00:00

I am a rails noob so the below is probably down to lack of

  • 0

I am a rails noob so the below is probably down to lack of understanding however I have been looking/reading all day and cannot seem to find the solution.

I have two models – project and technology :

Project :

class Project < ActiveRecord::Base

  attr_accessible description, :name

  has_and_belongs_to_many :technologies, :join_table => :projects_technologies

end

Technology :

class Technology < ActiveRecord::Base

  attr_accessible :abbr, :description, :name

  has_and_belongs_to_many :projects, :join_table => :projects_technologies

end

My Create_Projects_Technologies migration was as follows :

class CreateProjectsTechnologies < ActiveRecord::Migration
  def self.up

    create_table :projects_technologies, :id => false do |t|
        t.references :project
        t.references :technology
    end
    add_index :projects_technologies, [:project_id, :technology_id]
    add_index :projects_technologies, [:technology_id, :project_id]
  end

  def self.down
    drop_table :projects_technologies
  end
end

I am then using Active Admin to create and edit Project models using the following form :

ActiveAdmin.register Project do

  form do |f|
    f.inputs "Project attributes" do
      f.input :name
      f.input :description
      f.input :technologies, as: :check_boxes
    end
    f.buttons
  end

end

This correctly shows all my technologies as check boxes however as soon as I submit the form I hit the following error which I have not been able to overcome :

ActiveModel::MassAssignmentSecurity::Error in Admin::ProjectsController#update

Can't mass-assign protected attributes: technology_ids

All help is very much appreciate 😀

  • 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-09T17:21:25+00:00Added an answer on June 9, 2026 at 5:21 pm

    Simple add technology_ids to Project attr_accessible

    attr_accessible :client, :description, :name, :technology_ids
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Rails noob here looking for some advice/direction on something. I have several Pages and
I'm rails noob, and have been confused about sending params from controller to model.
Rails noob here. I have a rails application with (in this example) three tables.
I am a Rails noob and have a question. I have a feed aggregator
Rails 3 noob here. Currently the code in my controller below is getting the
I'm working in Rails 3.1 as a relative noob, and have managed to extract
Rails noob who has researched for weeks and tried all kinds of ways to
I'm a total Ruby/Rails/AR noob. I have a very basic sort of database schema
Noob here. I have a rails app that has users and postings. I need
Everything I am reading about rails 3 and AJAX says that we should have

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.