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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:02:34+00:00 2026-06-09T05:02:34+00:00

As per rails guides says ActiveRecord::AssociationTypeMismatch should be raised only when there is association

  • 0

As per rails guides says ActiveRecord::AssociationTypeMismatch should be raised only when there is association mismatch but in my case its something new..

Below is exception :

ActiveRecord::AssociationTypeMismatch (Service(#50963840) expected, got Service(#70493480)):

Parameters trace:

  Parameters: {"utf8"=>"✓", "authenticity_token"=>"EyilRRem8MLjCrIGq5aovntlrWpCnVBbq/v0tO1HpD4=", "room"=>{"name"=>"room1", "service_ids"=>["2", "3", "4"], "location_id"=>"25", "capacity"=>"2"}, "multiselect_room_service_ids"=>"4", "commit"=>"Update Room", "id"=>"3"}
Creating scope :page. Overwriting existing method AdminUser.page.
  AdminUser Load (0.2ms)  SELECT `admin_users`.* FROM `admin_users` WHERE `admin_users`.`id` = 1 LIMIT 1
  Room Load (0.2ms)  SELECT `rooms`.* FROM `rooms` WHERE `rooms`.`id` = 3 LIMIT 1
  Service Load (0.2ms)  SELECT `services`.* FROM `services` WHERE `services`.`id` IN (2, 3, 4)
  Service Load (0.1ms)  SELECT `services`.* FROM `services` INNER JOIN `service_rooms` ON `services`.`id` = `service_rooms`.`service_id` WHERE `service_rooms`.`room_id` = 3 AND (is_active IS true)
   (0.1ms)  BEGIN
Creating scope :page. Overwriting existing method Service.page.
Creating scope :page. Overwriting existing method Category.page.
   (0.1ms)  ROLLBACK
Completed 500 Internal Server Error in 79ms

ActiveRecord::AssociationTypeMismatch (Service(#50963840) expected, got Service(#70493480)):

Can somebody explain what could be the possible issue ??

  • 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-09T05:02:36+00:00Added an answer on June 9, 2026 at 5:02 am

    It was my mistake .. i was referring service association which wasn’t actually service object 🙂

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

Sidebar

Related Questions

Rails caches (file cache) per default domain-based, but is there a way to disable
Is there a way to cache per-request data in Rails? For a given Rails/mongrel
Cookies maximum size in rails application,as per rails guide it is 4 KB. http://guides.rubyonrails.org/security.html#session-storage
Are there any CMS available in rails which we can extends as per need
I have created a Rails Engine (as per the Rails Guides ) using: rails
As per Ruby on Rails convention, controller names get pluralized while model names are
Referencing this post: ruby on rails average per day I'm getting the average per
I'm trying to setup Subdomains in Rails 3 per Ryan Bates screencast on subdomains
I installed rack ssl for Rails 3.07 per these instructions: http://www.simonecarletti.com/blog/2011/05/configuring-rails-3-https-ssl/ It is not
As per rails usage: $ rails new --help Usage: rails new APP_PATH [options] Options:

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.