Questions tagged [batman.js]

batman.js is an MVC framework for building rich single-page browser applications. It is written in CoffeeScript and its API is developed with CoffeeScript in mind, but of course you can use plain old JavaScript too.

50 questions
10
votes
1 answer

406 error when responding with json

I'm trying to get a rails app running with the node.js framework batman.js via the batman-rails gem. When I'm responding with json in my rails controller, I get a 406 error everytime, and I don't know why. Here's my controller: respond_to :json …
Kombo
  • 2,273
  • 1
  • 32
  • 61
6
votes
2 answers

can batman.js be used with express?

I'm currently using Backbone.js for my webapp but I just read about batman.js and I like the features it has to offer. However, I want to know if it integrates with express or am I stuck with the batman server.
Ilia Choly
  • 16,442
  • 12
  • 75
  • 145
3
votes
3 answers

Using jQuery with Batman.js

I'm experimenting with Batman.js and I'd like to use jQuery with it for some standard Ajax and animation features. I'm following the installation instructions located at http://batmanjs.org/download.html and at the bottom of the page there's a short…
CPrimer
  • 623
  • 1
  • 6
  • 13
3
votes
1 answer

Require Node.js dependencies in Ruby/Rails gem

I'm having a great time live-reloading JS with fb-flo in my Rails & batman.js project. I want to move my code into a Ruby gem, but I don't know what to do. To run the flo server, I'll need to require("fb-flo"). If this was a node module, I'd just…
rmosolgo
  • 2,306
  • 1
  • 16
  • 20
3
votes
1 answer

batman.js input value

I want to pass the value of an input field from the view to the controller. What's the best way to achieve this without binding the input field to a property of the model? Example: view:
shoen
  • 11,805
  • 4
  • 20
  • 27
3
votes
1 answer

Dynamic class name in Batman.js view

My question is very close to Setting id and className dynamically in Backbone.js views, but for batman.js. In batman there are data-addclass method, but I need something like this: What will produce for…
Mik
  • 3,997
  • 1
  • 23
  • 32
2
votes
1 answer

Reorder Collection View Cells buggy

I'm able to get the cells to move around but it's buggy. When you move them around the pictures change and they don't stay where you move them. When you scroll down and scroll back, they move back. // // CollectionViewController.swift // 1.7…
2
votes
1 answer

How to load a remote HTML remplate into a view using Batman.js

I'm trying to use Batman.js with on a framework that isn't Ruby on Rails. Right now, I've been able to render views while settings the HTML content directly into the view class, such as this: class App.ContextMenuView extends Batman.View html:…
Michael
  • 1,120
  • 1
  • 11
  • 24
2
votes
1 answer

Dashing dashboard and batman.js binding

I'm writing a dashing widget to stream a video. I have a widget that works, however getting it to change the URL remotely with batman.js is eluding me. As far as I can tell, all I'm needing to do is modify the end of a URL inside an object, but I'm…
2
votes
2 answers

Rails 4 strong parameters custom require name

I created an API for my Rails application and I'm using BatmanJs for the front end. When creating a new item, Rails create it but throw me an error undefined method 'model_name' for TrueClass:Class associate to : items_controller.rb def create …
lkartono
  • 2,070
  • 3
  • 25
  • 43
2
votes
1 answer

Pass options to Sprocket Engines

I need to be using double quotes on my attributes due to a Javascript framework issue I am having, and I have tried setting the Haml::Template.options hash as the documentation recommends when using Rails, however isn't taking affect for the…
Joshua Dover
  • 167
  • 2
  • 11
2
votes
1 answer

BatmanJS: deeply nested routes

im wondering if anyone got something like this to work: @resources 'projects', -> @resources 'tables', -> @resources 'items' with corresponding view content like: %a{"data-bind" => "table.name", "data-route" =>…
adrian
  • 161
  • 7
2
votes
1 answer

Batman.js new app issue

I've repeated steps from batman.js readme: npm install -g batman batman new mj cd mj batman server And got this in Firebug trying to open localhost:1047 global is not defined Mj.run(); localhost:1047 (line 52) Mj.global is not a…
1
vote
2 answers

Multiple belongsTo Associations with Batman.js

I just wanted to check that there was nothing wrong with a model having 2 belongsTo: @belongsTo 'claim' @belongsTo 'buyer' I ask because I have this and saving does not produce the json it should: create: => alert @claim CT.Buyer.find…
1
vote
1 answer

Multiple lists in a Dashing widget

I've cloned the Dashing List widget and edited it so it'll contain three separate lists, like in this image. The job associated with the widget makes a GET request to a REST API search endpoint, and then creates a hash of the first five results. The…
Mike
  • 652
  • 3
  • 13
  • 27
1
2 3 4