Questions tagged [spine.js]

Spine is a lightweight framework for building JavaScript web applications.

Homepage: http://spinejs.com/

Spine.js Introduction

Spine is a lightweight framework for building JavaScript web applications. Spine gives you an MVC structure and then gets out of your way, allowing you to concentrate on the fun stuff, building awesome web applications.^

Resources

182 questions
1
vote
0 answers

Hem Build: Ignoring looking into old folders while building

I am using hem to build my javascript application. It had been working fine since around 10 months. However, now Hem is ignoring looking into old folders in "node_modules" while building, and thus, "require"ing them isnt working. If i rename the…
1
vote
1 answer

Failed to load files from gems installled with rails 4

I'm developing an webapplication with rails 4 and spine js as the frontend mvc framework. With gem 'spine-rails' installed, I ran the command rails g spine:new And in the app folder generated, the index.js.coffee file load some 3rd party…
Edward G.
  • 15
  • 3
  • 6
1
vote
1 answer

How can i pass additional params with each api call using Spine.js' Ajax Integration?

I have a Rails 4 based API that uses Devise for authentication and requires a user_token and user_email for each api call to be authenticated. The credentials sent are based on the user using the app at the time. I am using Spine.js for my front end…
Pete
  • 1,472
  • 2
  • 15
  • 32
1
vote
1 answer

Prevent creating DOM element in the controller and use view instead

As you may know Spine controllers create their DOM elements (
by default ). How could we prevent creating such elements and use only markup in the view? I read the documentation but didn't find any information.
Dima
  • 51
  • 8
1
vote
1 answer

Spine.js get associated controller from element

I got an html-element aside.sidebar with an associated spine.js controller. class App.Sidebar extends Spine.Controller tag: 'aside' className: 'sidebar' how do i get the controller from the element? something like this: con…
sebi
  • 143
  • 4
1
vote
1 answer

Spine.js - How to set up nested stacks

I'm trying to set up nested stacks in Spine.js. Although I copy-pasted the code that seems to work for others (https://gist.github.com/MikeSilvis/2839845) and adjusted the controller & model names it doesn't work. Both stacks get shown perfectly…
nenebale
  • 15
  • 3
1
vote
1 answer

Spine - Is there an after_activated callback

Is there an after_activated callback or a good way to implement it for the Spine.Controller? I am using Spine Stack Manager, I found the active class is actually set when active function of the controller is completed/returned. So there's no…
larryzhao
  • 3,173
  • 2
  • 40
  • 62
1
vote
1 answer

Spinejs routing not saving state

I'm trying to get states into my spine application. On click, an item is added to a list. An url is then created and navigated to, and then the list get's rendered. However, when I use the browsers "back" functionality, the list doesn't change back…
Jasper Kennis
  • 3,225
  • 6
  • 41
  • 74
1
vote
1 answer

How to rebind controller in spine.js?

How to rebind controller when it was initializated before element (this.el) was in DOM?
Krzysztof Romanowski
  • 2,164
  • 2
  • 20
  • 29
1
vote
1 answer

Spine.js AJAX fetching record from server

I have simple app which displays list of recrods, also user whould be able to edit barticular record by id. Because list is big, i don't fetch it as whole, but partially via Product.fetch(data: $.param(page: 1)). Then when someone try to edit…
Dfr
  • 4,075
  • 10
  • 40
  • 63
1
vote
2 answers

Dropping Spine.js into an existing app?

I've been looking at quite a few of the MVC for JavaScript frameworks lately and I quite like the overall feel of Spine.js as well as the fact it is using CoffeeScript. That said, my primary concern at this stage is I need to be able to drop an MVC…
bigtunacan
  • 4,873
  • 8
  • 40
  • 73
1
vote
2 answers

Spine.js, setting model default values

There is in rails we have lifecycle hooks, which allows us doing this: class Subscription < ActiveRecord::Base before_create :record_signup private def record_signup self.signed_up_on = Date.today end end Is there best way to…
Dfr
  • 4,075
  • 10
  • 40
  • 63
1
vote
1 answer

why does spine.Model have functions with the same name in the prototype

I am trying to understand how it works Why do functions have the same name in the prototype and how are they being used if the function for example Model.fromForm takes precedence over the prototype one. I mean the declarations are made in the base…
Richard
  • 4,516
  • 11
  • 60
  • 87
1
vote
1 answer

Spinejs. Has no method 'hasMany'

I have problem with spinejs associations. class Category extends Spine.Model @configure 'Category', 'name', 'id' @extend Spine.Model.Ajax @hasMany 'children_categories', 'Category' @url: Route.categories() but it writes an…
Pavel
  • 3,900
  • 6
  • 32
  • 41
1
vote
1 answer

SpineJS handle server-side rails model validations

I have a model, let's call it Book. In rails, when the Book is saved, I validate the uniqueness of it's ISBN number. For my front end, I have a simple SpineJS app which let's me add a new book. In SpineJS: class App.Book extends Spine.Model …
Pete Hamilton
  • 7,730
  • 6
  • 33
  • 58