0
votes
1answer
33 views

Ember.js REST adapter handling different JSON structure

I'm using REST adapter, when I call App.Message.find() Ember.js makes call to the /messages to retrieve all messages and expect to see JSON structure like this: { "messages": [] // array contains ...
0
votes
0answers
20 views

Ember Data Model - How to choose model class based on discriminator property (GeoJSON)?

I'm trying to model the GeoJSON spec using ember-data. I've found this gist and it is quite interesting. However, it doesn't support geometries other than Point. Consider this geoJSON example: { ...
2
votes
2answers
52 views

Proper Ember.js resource route declaration

I'm trying to wrap my head around Ember resources but I'm hitting a wall. Looking at guides like Rails + Ember.js I see the preffered way of declaring a resource route is: ...
0
votes
0answers
21 views

Update several models in emberjs

Given an array of ids I would like to update several emberjs-data models at the same time. I know that to update one record you use reload() and then commit the store. Is there a way I can ...
0
votes
0answers
12 views

Ember Data Model State Flags Wrong?

I have a basic DS.Model. When I first load the application, this model is fetched from the server via .find(id). I have an observer on this model that watches the progression through various states of ...
1
vote
2answers
47 views

Ember - Object has no method 'map'

I am going through the ember.js guides to learn Ember, and I am using the latest builds of ember.js, ember-data.js, and handlebars.js. I am able to successfully set up a basic nav that switches ...
0
votes
1answer
30 views

Ember can't access the controllers scope in a didLoad callback when testing with Konacha

This code works perfectly on my browser: doLogin: (user) -> _controllers = @get('controllers') res = Cluey.Order.find({table: null, user: user.get('id')}) res.on 'didLoad', => order ...
3
votes
1answer
39 views

Ember-Data objectAt() to get first result does not work

I'm populating two templates with data: the first template has detailed information about the model (called Slider), and the second template has a list of the last 5 sliders. The problem is that when ...
0
votes
0answers
36 views

How to show last post inside Ember.js blog application “index”?

In the Ember video from http://emberjs.com/guides/, there is a sample blog application. When you go to the root of the site, you see the list of posts on the left side menu and a message like ...
1
vote
2answers
52 views

Building single model in EmberJS

What is the correct way to define model and routing to build a model that can be used as Application Data. App.Router.map(function(){ this.resource("main", {path:"/"}); }); App.MainRoute = ...
0
votes
1answer
54 views

EmberJS Rails API security

Setup is an Ember frontend with a rails backend using JSON api. Everything is going fine but some questions do come up: How do I ensure only the emberjs application consumes the api? I wouldn't want ...
0
votes
1answer
48 views

reflection on all ember data models

In my app I want to create an interface to the server database. That's why I'm looking for a list of all models I defined in the app. Example: App.User = DS.Model.extend({ ...
0
votes
1answer
61 views

Ember.js loading simple data from API

So, I have a simple page with Ember.js where i'm trying to load data from rest api. Api is provided by apiary.io and returns the following simple data {"semantics": [ {key : "11111", name : "Block ...
1
vote
1answer
94 views

How to use two different adapters at the same time in Ember.js application?

I'm using basic adapter for one API: App.Store = DS.Store.extend({ revision: 12, adapter: DS.BasicAdapter.create() }); Lets say I need to retrieve some data from an other service but using ...
0
votes
1answer
78 views

How to display nested data in template from Ember.js model using basic adapter?

Store: App.Store = DS.Store.extend({ revision: 12, adapter: DS.BasicAdapter.create() }); Model: var Profiles = DS.Model.extend({ displayName: DS.attr('string'), profileName: ...
1
vote
1answer
167 views

Ember.js Object #<Object> has no method 'resolve' (jsFiddle inside)

I have code (http://jsfiddle.net/bug0r/94h3a/17/) There is error when data loading by rest.api - Object #<Object> has no method 'resolve' Could you help to find an error? ember - ...
1
vote
1answer
207 views

Ember.js changing RESTAdapter JSON serialization

I have a model that I'm querying from an API: App.Deal = DS.Model.extend({ name: DS.attr('string'), value_in_cents: DS.attr('number'), closed_time: DS.attr('date'), user: DS.attr('object'), ...
0
votes
0answers
59 views

How to dynamically allocate valueBinding in Ember TextField based on view loading the template

I have a few views and they each share the same template. In the template properties of the view that is loading it are used as id, name etc. for various elements. Among these elements is an input ...
0
votes
1answer
46 views

ember data setting content type to application/html instead of json

I had declared an ObjectController to edit a post App.PostsEditController = Ember.ObjectController.extend updatePost: (event)-> @store.commit() but I see that a html request is being sent ...
0
votes
2answers
97 views

How do send an event in Ember?

I have this code in my html page: <script type="text/x-handlebars" data-template-name="logged"> <h1>Page</h1> {{view.name}} {{#view App.LoginButton}} ...
0
votes
2answers
58 views

How to detect if a new record in ember data has changed

I want to detect a change in a new record. However, the record is new and dirty from the moment I create it. var record = transaction.createRecord(App.ContentOfSomeSort, data); ...
0
votes
2answers
107 views

Create and read a record in Ember.js

I'm working with Emeber.js framework; I've created an object like this: myApp.user=Ember.Object.extend({ name:null, state:false }); I've also defined an Ember model this way: myApp.Wuser = ...
1
vote
1answer
53 views

How to handle cancel/rollback when transitioning between views in emberjs

So I asked a similar question awhile back. However, something about that solution left a bad smell. Here's the scenario, when I want to create a record I have a new route. So for example ...
2
votes
1answer
223 views

ember data serializer data mapping

I'm using ember & ember-data to try and consume a json feed from the server. Here is my code: App = Ember.Application.create(); DS.RESTAdapter.configure( "plurals", { category: ...
0
votes
1answer
121 views

Ember.js Model with embedded object

I'm going to query an API that return embedded objects in the response, so I'm simulating this with the fixture adapter. My data looks like this: App.Deal.FIXTURES = [ {id: 1, name: 'Deal 1', ...
1
vote
1answer
640 views

Ember.js Rest Adapter: mapping JSON with no root (.NET Web API)

I have an existing service written with the .NET Web API. As an example, this service returns JSON in the following format: [ { "id": 1, "name": "John" }, { "id": 2, "name": "Jane" } ] ...
0
votes
0answers
52 views

Missing Updates on Observers?

Here's a Fiddle The template has several instances of the same subView with different bound properties. You can see when those bound properties trigger an event on their observers. Note that subViews ...
0
votes
3answers
45 views

Looping through the result of App.Car.find()

Assumed I have a model Car I could get all cars with cars = App.Car.find() How can I loop through all cars to change an attribute of each car (something like cars.each do |car| in Ruby)? For a ...
0
votes
2answers
82 views

Where does data returned by ember-data 'live'?

ya'll I have a bit of a structural/procedural question for ya. So I have a pretty simple ember app, trying to use ember-data and I'm just not sure if I'm 'doing it right'. So the user hits my index ...
0
votes
0answers
44 views

Tristate checkbox in ember

I have to implement a tristate checkbox in ember quickly so I was wondering if someone can give me a pointer to an implementation of tristate checkbox in ember?
2
votes
1answer
288 views

Ember.js data - basic adapter does not implement findAll method?

With the basic adapter App.Store = DS.Store.extend({ revision: 12, adapter: 'DS.BasicAdapter' }); I have: 'Uncaught Adapter is either null or does not implement findAll method'. And ...
0
votes
1answer
112 views

Ember Data Mapping Missing In Newly Created Model Hash

I have an Ember app tied into a Rails API. My Model is defined like this: NewsCMS.NewsItem = DS.Model.extend({ title: DS.attr('string'), date: DS.attr('date'), body_html: DS.attr('string') }); ...
2
votes
1answer
161 views

Ember.js Search Model Verbs

The tutorials & guides that I've found suggest that Ember.js models are very data centric, in that you have data in the browser that is persisted to the server and/or a model is filled with data ...
0
votes
1answer
112 views

Ember.js different resources in one namespace

Cheers! I have to different resources in one namespace in my rails back-end side: namespace :api, defaults: { format: :json } do resources :users, only: [:show] do collection do ...
1
vote
1answer
66 views

Get stacktrace for Ember Application in in production mode

I am trying to debug emberjs and ember-data application in production server. I am listening on window.onerror so when something breaks I get callback where I can error message, line no and file. But ...
0
votes
2answers
193 views

can't display models from ember-data

I am usng Ember.js 1.0.0 RC1 and ember-data revision 12 I have PHP Slim framework in the back and Ember.js as UI. I want to load data from REST backend and list it in the template. So here is my ...
0
votes
0answers
57 views

ember data wait for all records to be commited

I'm building an image upload site with Ember 1.0.0-RC.1 and ember-data. When the user uploads the pictures I first create the image records and commit them to my API. After the array of objects has ...
0
votes
1answer
139 views

populating select box using emberjs select view

I working on a toy app to learn ember. I have recipes that belong to styles. A style just consists of a name attribute (and the implicit id as well). I am having trouble setting up a select field in ...
1
vote
1answer
33 views

Pass Data to Child Templates

How would I access data from a child template? For example, her's my router: App.Router.map(function() { this.resource("users", function(){ this.route('new'); }); ...
2
votes
1answer
94 views

Ember.js Data Conflict Resolution / Failing on Conflict

If using Ember.js with the ember-data REST adapter, is there some sort of conflict resolution strategy for handling persisting data to the server? At the very least, for my case, failing and rolling ...
0
votes
0answers
282 views

Ember.js Injecting a Depency Into Controllers, Routes and Data Store Adapter

I'm trying to inject a dependency into a data-store adapter, so it's available from its "init" method, onwards, but I'm having trouble. I'm the method outlined in ...
2
votes
2answers
592 views

Ember.js: Save record to Ember.Data, wait for response before displaying

I'm building an app which allows users to post to Twitter. When they click the submit button we close the posting form. We create a Message object which is saved to the data store and sent to the ...
1
vote
1answer
465 views

Ember.js with Websockets / socket.io. Ember API Calls / Recommended Structure for Loading Real Time Data

I'm trying to integrate real-time data updates from the server in Ember.js, using socket.io. I've found https://gist.github.com/brentjanderson/4360857 which is an (incomplete, as far as I can tell) ...
0
votes
1answer
99 views

EmberJS: How to provide a specific URL for a model in ember-data RESTAdapter?

Question 1: If I have a ember-data model called "Company", how do I tell it to hit /businesses and /businesses/:id to retrieve records instead? Is there a way to specify the url for a given model? ...
2
votes
1answer
199 views

Ember.js with Ember.testing = true

I am trying to get testing working in Ember.js with the Ember.testing = true flag set to disable the automatic run loop etc I have this code Ember.testing = true; Ember.run(function() { App = ...
2
votes
1answer
272 views

Ember.js Recommended Way to Remove Items From a Collection and Persist to REST

I've followed the PeepCode tutorial on Ember.js, and am extending it to remove items from the tab. I'm also implementing a simple RESTful interface on the server to persist changes, and am using ...
2
votes
1answer
88 views

Emberjs: How to filter by more than one property at once

Below I am filtering by a single property sure, but how do I filter by another one in one go? That is, without providing the user with a drop down containing different search options Example: My ...
2
votes
1answer
116 views

Emberjs: How do I filter users by any property using routes

I have the following route and model setup. All my users display fine using a template and displays the firstName and email as expected. However I am unable to filter by firstName or email when ...
0
votes
2answers
51 views

How to add a new many relationship to parent model?

Disclaimer: I tried to make a jsfiddle of this, but without a public source for the RESTAdapter, I couldn't really make it work. I have a model with a hasMany array of child models. I need to add a ...
3
votes
1answer
110 views

Is there a way to use a different property name than what's in my JSON?

I have the following JSON (simple example): { id: 101, firstName: "John", surname: "Doe" } But I want my model to use lastName instead of surname. Something like this, maybe: ...

1 2 3
15 30 50 per page