0
votes
1answer
21 views

Rails/Backbone.js content with script tag shows error “Uncaught SyntaxError: Unexpected token ILLEGAL”

I have an app that has page content that includes script tags, but when it tries to render it gives the error 'Uncaught SyntaxError: Unexpected token ILLEGAL'. I'm initializing a backbone app as ...
0
votes
1answer
31 views

Preload selected options for select

I am using a lot of things (Rails, Backbone.JS, HTML) and I don't know how to load a selected value for a select. I am in a "edit" form and I want to load the info from the server (Rails API) and load ...
1
vote
0answers
48 views

Render ERB with underscore templates without displaying in browser

Am trying to generate a PDF from a HTML file which itself is generated from dynamic content. So there is a controller action "generate_pdf" which takes HTML content and renders a PDF. The pdf ...
0
votes
0answers
45 views

how to wire a bootstrap modal form with a backbone based ruby on rails app

I am trying to get a bootstrap modal wired with backbone in my Rails application. Here are the relevant pieces: app/views/scenarios/_form.html.haml -- snippet .row .span4 = f.input ...
0
votes
1answer
35 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 ...
0
votes
1answer
51 views

uncaught exception: Template undefined not found, ReferenceError: Backbone is not defined

I am trying to follow along with this series: http://www.backbonerails.com/series/engineering_single_page_apps I am on episode 5, at around the 48 min mark. When I refresh the page in my browser, I ...
0
votes
0answers
44 views

Template undefined not found

Hi I am working on a tutorial, and extending a question I had here - backbone + rails TypeError: List.Header is not a constructor I fixed the problem that I originally had in the old question, ...
2
votes
0answers
37 views

backbone + rails TypeError: List.Header is not a constructor

I am trying to follow along with the tutorial I purchased from this site: http://www.backbonerails.com/ I am following along with the 5th episode of the series, "Getting Up and Running - Part 1". At ...
2
votes
1answer
39 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
47 views

Backbone callback functions, success not triggering code

I'm doing a simple AJAX call to append an album's tracks in an unordered list. It will append the tracks on the second click with this code: window.app.views.AlbumView = Backbone.View.extend({... ...
0
votes
1answer
40 views

Is backbone.js (or any similar framework) useful for a single page in a multi-page application

I'm making a board game in rails, and was considering using backbone.js (or a competing library) to handle the gameplay page and manage all of the models and the UI. Is it useful for something like ...
0
votes
1answer
38 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
15 views

ActiveModel::MassAssignmentSecurity::Error (backbone.js + rails + rails-backbone gem)

I am trying to continue along the path I was lead down in this post: render show page on submit backbone.js + rails + rails-backbone gem I am still trying to figure out what I describe in the first ...
0
votes
1answer
49 views

Getting Data out of a postgreSQL database with backbone.js

So can't get these albums rendered(in a rails index list fashion) with backbone that are persisted into my postgres db: [#<Album id: 1, title: "abbey road", artist: "the beatles", created_at: ...
0
votes
1answer
94 views

render show page on submit backbone.js + rails + rails-backbone gem

I am trying to setup my index.html.erb (root page) so that I can see two elements. A "new post" form, and a "new user" form. I am trying to get the forms' submit button to go to the show page after a ...
0
votes
1answer
30 views

backbone.js + rails + firebug TypeError: this.model is undefined

Ok guys, I originally set out to render the users' NewView onto my root page. I have gotten to the point where I can see the form, but when I fill it out and click "Create User" I get this error: ...
0
votes
2answers
49 views

ReferenceError: users is not defined rails + backbone + firebug

So I asked this question: render view in backbone.js + rails I feel I have gotten close to the answer thanks to people pointing me in the right direction. The code in my ...
0
votes
1answer
85 views

render view in backbone.js + rails

I am trying to render the view "new_view.js.coffee" (a form to create users) on my root page. I am using the rails-backbone gem, so far I have this: app/views/home/index.html.erb <div ...
-1
votes
0answers
31 views

Backbone.js + Rails - Rendering

I am trying to write my frist backbone + rails SPA using the "rails-backbone" gem. I set up my app according to the instructions here: https://github.com/codebrew/backbone-rails What I am trying to ...
2
votes
1answer
74 views

How can I create this JSON structure with JBuilder and Rails?

TL;DR: How can i use jbuilder to create JSON that looks like this? [ {}, // Your new pagination state [{}, ...] // An array of JSON objects ] Longer version: I am trying get pagination working ...
0
votes
1answer
34 views

why is display:block css only staying open momentarily

I have a Rails app with profile pages that allow users to post different types of information about themselves. On the left side of the page, there is, for example, a link that says "Add Job," which ...
1
vote
1answer
76 views

“SyntaxError: unexpected }” when setting up backbone.js with rails [closed]

Ok, I'm baffled. I am trying to set up a rails/backbons SPA. I am following along with this railscast: http://railscasts.com/episodes/323-backbone-on-rails-part-1?autoplay=true I get this error from ...
0
votes
1answer
34 views

Rails + Backbone - Backbone routes not working

I have push state enabled, Backbone.history.start({ pushState: true }); When i try to click on this link, <a href="/page/all">All</a> Its redirecting to the URL, but backbone ...
0
votes
1answer
73 views

AJAX image upload with Rails, Backbone, Remotipart

I've been using Remotipart successfully to upload images via AJAX for a while now, but we've recently decided to go the Backbone route, and now since my forms are rendered via JS templates, I'm no ...
0
votes
1answer
37 views

Backbone template variables only working with if I use this in template

In my template I have to put this.name and this.gravatar to access my user model data attributes. If I don't I get an error message when the template attempts to render. Everything works but I don't ...
0
votes
1answer
58 views

Changing state of to do list tasks with Backbone in Rails app

I'm very new to Backbone and I'm making a to do list app to learn the basics. Right now you can add a task and it is rendered in the to do list. Each task has the properties name (string) and ...
0
votes
0answers
50 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
2answers
120 views

Communication between Backbone.js collection and Ruby on Rails service with parameters

I'm currently involved in making my first serious web application. I've spent the last few months frantically researching the web, including stackoverflow, studying many different technologies. HTML, ...
0
votes
0answers
57 views

Nested resource parameters with Rails and Backbone.js

I've got this issue where I am seeing the incoming parameters nested incorrectly. Here's some of the setup: In routes.config I've defined: resources :events do resources :guests end As a result ...
0
votes
1answer
39 views

Backbone Collection return wrong data

Hi i have backbone app as follows: code.js.coffee window.Code = Models: {} Collections: {} Views: {} Routers: {} initialize: -> new Code.Routers.Todos(); Backbone.history.start() ...

1 2 3 4 5 13
15 30 50 per page