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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:23:45+00:00 2026-06-05T01:23:45+00:00

I am having problems with the model Collection . I’m using mongoid with mongodb

  • 0

I am having problems with the model “Collection”.

I’m using mongoid with mongodb and rails 3.2.

I have the problem when I try create a nested resource from collection with a select with simple_form sth like:

 <%= f.input :collection_id, :collection => Collection.where(:user_id => current_user.id).order([:created_at, :desc]), :input_html => { :id => "m_collection_id" }  %>

However with the other words for the model working fine.

My question is if it’s possible create a model with the “Collection” word with ruby on rails 3.2, mongoid and mongodb.

Thank you very much!

  • 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-05T01:23:47+00:00Added an answer on June 5, 2026 at 1:23 am

    While I’m not sure if “collection” is a protected word in rails, mongodb, or simple_form, it’d probably be best to not use it. There are several methods that have “collection” in the name, such as collection_select for example. I checked around on a couple reserved word lists, but didn’t find it there.(Here’s the best one I found: http://cheat.errtheblog.com/s/rails_reserved_words/)

    When I’m not sure about a word though, I just go to a thesaurus online and look up a good synonym. Some good ones I saw for collection are compilation, aggregation, assortment, medley(ok, maybe not that, but you get the idea).

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

Sidebar

Related Questions

I'm having a problem using methods in my module's model class. I have a
I am using MVC-View Model, EF Model first I am having problems with two
I'm having a problem with nested model forms that contain radio buttons, when I
I'm having a problem in my Ruby on Rails app with a model where
Using rails 3 and mongoDB with the mongoid adapter, how can I batch finds
I'm having a very strange problem. I'm getting a collection of Rails ActiveRecord models
My model is quite simple but I'm having some problems with the vector I'm
I am having a problem calling a model property from my view. I may
I'm having a problem with my nested form. Models: class UserAnswer < ActiveRecord::Base belongs_to
I have a view model with a collection of other objects in it. public

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.