1
vote
1answer
35 views

Backbone application undefined error

I am just starting backbone and javascript and am receiving the following error in console. players = new Dww2.Collections.Playermaps() ReferenceError: Dww2 is not defined application.js //= ...
0
votes
2answers
24 views

How to stop Backbone sending calculated values back to the server when doing model.save?

Say I have a person model, with a name attribute. Server-side, when I create a JSON representation of the model, I include a calculated value: name: 'Jack' name_backwards: 'kcaJ' # example ...
2
votes
1answer
34 views

Backbone model fetch error message

I have a Rails3 server where I administrate the users. When I do login in my backbone client app, I connect to the server doing a model.fetch operation. How can I manage correctly when the login is no ...
-1
votes
0answers
18 views

Pattern Backbone, populate a collection from different urls

This is more a question about REST than Backbone, but anyway. I am designing the urls (according REST pattern) for my app and I have a collection that can populate with a different list of models ...
0
votes
0answers
27 views

Sub-routes in Backbone.js like in Rails

all! I'm learning backbone.js now and writing small rails application using this js library. I really need your help to understand something about backbone.routing. So, I have two rails model: List ...
0
votes
0answers
29 views

how to handle dynamic events in backbone js using rails

I am starting off with backbone JS. I have an application where most of the application is in rails and only certain parts is using backbone JS. If you see the below code from eco template, every ...
0
votes
1answer
42 views

Rails backend Role based Access control suggestion

I need to implement role based access in the rails application we are building. The user and roles information are housed in a different db. authorized resources for a user are now available by ...
2
votes
1answer
59 views

cancan on a single page application

What is the proper way of checking ability on a single page application (backbone.js)? E.g. if it was a non-single page application, I could write on the template <% if can :read? @resource %> ...
0
votes
1answer
42 views

Backbone fetch doesn't work

I am a little bit stuck on trying to fetch a Backbone Colection, I am a new to Backbone and I am sure that I've missed something simple, but do not know what. Have some ideas? $ -> User = ...
0
votes
1answer
40 views

How to pass parameters to a collection view server call?

I am developing a Backbone.Marionette web app. In this app I got a project collection view. Each project can have different statuses (pending,active,completed). I would like to add buttons to the list ...
0
votes
0answers
56 views

Rails respond_with not… responding

I have a Backbone.js app running on Rails, and when I update I'd like to return the object. I have the following controller that is not responding to my json request. class EventsController < ...
0
votes
1answer
54 views

Backbone and Coffeescript “this” reference issue

I have a problem with the "this" reference on Backbone with Coffeescript, this is a method which shows information of an artist: show: (id) -> self = @ if @collection artist = ...
0
votes
1answer
27 views

Javascript event in Chrome vs. Safari

I have an HTML element which looks like this: <select class="indiv_unit" name="indiv_unit" id="indiv_unit"> and I am trying to trap select events (when the user makes a choice) in a ...
1
vote
1answer
111 views

Backbone.js .destroy Passing Additional Params?

When .destroy'ing a Model, I need to pass an additional parameter to my Rails app. I've read a few posts on how to do this, however my Rails app still isn't recognizing it. Any suggestions? The ...
0
votes
1answer
51 views

Backbone.js on Rails - Access data in Rails outside of the Backbone model

I have a Backbone.js application with RoR for the backend. The typical backbone.js setup is it gets the data from the table, and updates/saves data to that same table. However, my backbone model is ...
0
votes
1answer
33 views

Rails + Show Dynamic content with backbone.js

I'm making an API call using backbone model that returns JSON with list of posts. Each post is dynamic as it can be 1. liked or unliked 2. commented or not commented 3. Shared with Public or private ...
0
votes
0answers
69 views

backbone.js for rails 3.2.13

I am using rails 3.2.13 and ruby 1.9.3 I tried to use gem "rails-backbone", '0.9.10' but it is not working properly as per REST Are there any other changes required to bo done for rails 3.2.13? I ...
0
votes
1answer
88 views

Paperclip photo.url not working in Backbone.js

I tried to display the images in Backbone.js view page. My show_view.js.coffee is Myapp.Views.Checklists ||= {} class Myapp.Views.Checklists.ShowView extends Backbone.View template: ...
3
votes
1answer
298 views

Devise Backbone Heroku and require.js on Rails configuration

Ok, so I know I am playing with the big boys and girls here messing with front and backend MVC (even though bbone isn't exactly MVC) for an application, but this is the first real robust application I ...
0
votes
1answer
174 views

updating global variable using Backbone in Rails

I have the save function of my single page application now up and running, with different front end models and collections in Backbone (a song.js and songsCollection.js), saving to the appropriate ...
0
votes
2answers
121 views

rails json api is returning 406 http error when used from an outside page (backbone and phonegap)

I've build a rails 3 application. This application has a json API. I've developed a html+javascript Backbone UI (Jquery ajax) that calls the API. Everything works fine. Now, I wan't to use this ...
1
vote
3answers
174 views

401 unauthorized when trying to save Backbone model to rails db

I am trying to match a song (in BBone world) through Rails to the DB. I continually am getting a POST http://localhost:3000/songs 401 (Unauthorized) when trying to save in the BBone View. The rails ...
0
votes
1answer
129 views

Backbone on Rails how to add a model to a collection from different views?

I'm developing a Rails app using Rails 3, and the backbone-on-rails gem. I have a backbone route which shows ProductTypes. It has a backbone view for the list, and a view for the form, so the usar ...
1
vote
1answer
158 views

backbone vs turbolinks for search engine with rails 3.2

I'm working on a small search engine with tire and elastic search. I just started the project and I would like the search to be as fast as possible. What technology should I use for this purpose, ...
0
votes
1answer
30 views

Rails's content_tag analog in jQuery or Backbone?

Are there anything similar in jQuery or Backbone to content_tag helper method from Rails? I want to built a complex piece of html which I want to generate in run time on client side. So I'm looking ...
4
votes
2answers
83 views

Rails asset pipeline workflow when there are hundreds of asset files

We recently converted a Rails 3.2 project to use the asset pipeline. Our app uses many asset files (~250 *.js.coffee files, another 200 or so *.jst.hamljs templates, and ~100 *.css.sass stylesheets). ...
0
votes
1answer
71 views

Backbone application: storing user settings

I have been recently working on a rails/backbone application. Until now, any time a user made some specific changes to the application (e.g. chose one view over others, used certain filters, ...
0
votes
1answer
78 views

When creating a new object in backbone.js my attributes save as nil

So everytime i create a new affiliate it saves into the database but with no name. I can't for the life of me figure this out. class Shop.Views.AffiliatesNew extends Backbone.View template: ...
1
vote
1answer
428 views

Back navigation not reloading jwplayer in backbone js and rails 3 app

My app is a rails 3 app using backbone.js and jw player for playing a playlist of videos. The index_view for the videos has all the videos loaded into a playlist for jw player. My problem comes when I ...
1
vote
1answer
106 views

Updating a partial backbone model

I know this has been asked before, and I have it working, but I'm not sure how/why it works and was hoping somebody could explain it to me. I have a model and I'm changing only one attribute at a ...
0
votes
1answer
203 views

Backbone With Rails

I'm getting my data from a service and then setting the data to my bean object and want to using the same data in my view displaying it in a form in rails view now. Now I want to validate this form ...
1
vote
1answer
101 views

How to do integration testing with front-end code and API in separate repositories?

Any strategies for doing this? We have a Rails codebase that is currently fully integrated (same app serves up JS assets as does the back-end heavy lifting), but are thinking of extracting the two out ...
0
votes
1answer
33 views

Is there a way to display multiple collections on a single page using Backbone.js and Rails 3?

I am trying to develop a single page application using Rails 3 and backbone.js. Is there away to instantiate two different collections in a router? Or would I need two routers routing to the same ...
0
votes
0answers
59 views

Maintaining locale between Js and Rails

I have an application which is Ruby on Rails/Devise front-end, and then Backbone.js. In app/views/layouts/application.html.erb I have this: <head> ... <script type="text/javascript"> ...
0
votes
2answers
122 views

Adding content to an element created dynamically in Backbone with Rails

I have a Backbone View in Rails 3 where the initialize has a line which dynamically creates a div with a class like this initialize: () -> $('body').append('<div class="new"></div>') ...
2
votes
2answers
208 views

is there a backend for recline.js built to work with rails?

Recline.js seems a great tool to display data on grids, maps, etc. I'd like to use the grid views, but to be able to save what is displayed to the user on a database. I'm currently using rails for ...
0
votes
2answers
121 views

How to re-render view on creating new entry to model in Backbone.js?

I am backbone.js newbee. I have a Bookmark Model, in my Rails application. I am trying to create a text field in which when I enter text and click submit button it should create entry and display it ...
0
votes
1answer
75 views

Backbone Structure Tips

New to Backbone and wondering if any Backbone experts can lend their advice as to how to structure the following application: Users log in to view the Dashboard. The Dashboard has 6 Panes and the ...
1
vote
1answer
199 views

Rails and Backbone architecture

I have been hearing a lot about Backbone and wanted to use it for my latest project to learn it. However, I am coming from Rails background, and my experiences do not seem to translate well for ...
0
votes
1answer
82 views

Can't access id on Backbone model on rails?

Problem: I am mirroring resourceful models in Rails with Backbone.js.I'm trying to get the current user id to a Backbone Workshop.Models.User model so I can save the user to the database through the ...
1
vote
1answer
1k views

Backbone, Bootstrap modal within template not showing

I am trying to generate a modal for each of my posts so that each post has a modal containing the post content(and eventually comments). When the comment link is clicked the modal will appear. The ...
0
votes
1answer
447 views

Backbone and Rails 3 Uncaught TypeError: Cannot call method 'on' of undefined

I am developing an application and I am following this rails cast: http://railscasts.com/episodes/323-backbone-on-rails-part-1 Everything seems correct except that I keep receiving an error when I ...
0
votes
1answer
133 views

Render form from view in a template

I'm evaluating backbone.js, backbone-forms and Rails, and I have some problems ... I have a view where I create a new model and a form, and I want to display this form with other html elements, so ...
2
votes
1answer
6k views

“Uncaught TypeError: undefined is not a function” - Beginner Backbone.js Application

I'm setting up a pretty simple app with backbone, and I'm getting an error. Uncaught TypeError: undefined is not a function example_app.js:7 ExampleApp.initialize example_app.js:7 (anonymous ...
0
votes
1answer
88 views

Rails Backbone App Showing Nothing — Including Errors

I've been working through thoughtbot's Learn Backbone.js on Rails, and I can't even get the beginning test application to work, but I'm also getting no Javascript Errors in the console. Here's my ...
1
vote
0answers
157 views

How to give restful (nested) url in a collection in backbone.js?(Rails App)

In my rails App I have nested routes as follow:- resources :users do resources :posts do end end Suppose I need to fetch all the comments for a post of an individual user. I should make a use ...
2
votes
1answer
167 views

Backbone.js + Rails 3 urls and collections with nested routes

I'm trying to create a new application with both Rails and Backbone.js, but there are quite a few nested relations that are making it rather difficult. On the Rails side, I'm using a HABTM ...
0
votes
1answer
168 views

DragonFly attachment and BackBone.js

I'm trying to attach an image to a model using BackBone.js, in Rails all works as expected. But with BackBone.js I don't get how to attach an image and for example show it in the show template. as ...
0
votes
0answers
103 views

Connecting Rails app + Devise facebook with phonegap

I have a rails app with devise facebook authentication, Now I would like connect my app with a mobile version (Phonegap android). How to I can connect Phonegap with my rails app ?. Any idea ?. Really ...
0
votes
1answer
141 views

Backbone.js and ActiveRecord

This is a Noob question regarding Backbone.JS and ActiveRecord. I'd be grateful for a pointer on how to debug this. I'm trying to use Backbone.Js code to create a "Trainer" object, which has a single ...

1 2 3
15 30 50 per page