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

  • Home
  • SEARCH
  • 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 8888149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:58:18+00:00 2026-06-14T21:58:18+00:00

I use rails-backbone gem and I generated a Backbone model. The model includes paramRoot:

  • 0

I use rails-backbone gem and I generated a Backbone model. The model includes paramRoot: attribute. I assume it somehow tells Backbone how to connect to the corresponding Rails model, but I can’t find any documentation about it.

What does paramRoot actually do?

  • 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-14T21:58:19+00:00Added an answer on June 14, 2026 at 9:58 pm

    Backbone-rails doesn’t document paramRoot. I suppose you’re supposed to use the generators to build your models:

    class <%= model_namespace %> extends Backbone.Model
      paramRoot: '<%= singular_table_name %>'
      #...
    

    and blindly do as you’re told.

    If you want to know what it does then you have to read the source (as usual). The only thing in Backbone-rails that uses paramRoot is their replacement for the standard Backbone.sync; their replacement contains this:

    if(model.paramRoot) {
      data[model.paramRoot] = model.toJSON();
    } else {
      data = model.toJSON();
    }
    

    All that does is change a model’s serialized attributes from the standard {attr1: v1, attr2: v2, ...} Backbone form to the { model_name: { attr1: v1, ... } } form that Rails wants; then you can look at params[:model_name] in your Rails controllers rather than looking at just params.

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

Sidebar

Related Questions

I have an application in rails 3 using backbone.js When I use @model.save, i
I'm using Backbone.js 0.9.2 from the Backbone-on-rails gem. I'm also trying to use the
I want to use rails genrate command in gem development. Is it possible?
i use rails and mongodb (mongoid gem). i need to create a select form
I’m using Backbone.js and Rails. In Backbone.js I use HTML5 push state to set
Rails app, learning CoffeeScript and Backbone.js: Uncaught TypeError: Cannot use 'in' operator to search
Is there any turotial to use both backbone js and Jquery together with rails
I am beginning to use Backbone and am trying to transition my Rails backend's
I'm using the backbone-on-rails gem with javascript (as opposed to coffeescript) to render views
I'm implementing async photo uploads using backbone & the rails 'paperclip' gem: Questions: Do

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.