0
votes
1answer
30 views

Camel case json when not using ember-data

I am plan use emberjs without ember-data, using Ember.Object. I use rails in back end. The json api rails give is using underscore, I want to change it to camel case in ember end. How to do it ...
0
votes
0answers
22 views

Proper Handling of hasMany/belongsTo in Ember Data with Rails Persistence

I have an Ember.js app (1.0.0-rc.3) using Ember Data (Rev 12) to persist to a Rails backend. On the client side, I have two models that have a one-to-many relationship: App.Child = DS.Model.extend( ...
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
28 views

ember-data: server side code for removing an associated object

I 'm working with revision 12 of ember-data RESTAdapter and using the rails-api gem. I have these models: App.TransportDocumentRow = DS.Model.extend, productName: DS.attr 'string' ...
0
votes
0answers
41 views

ember-data rest api customization

I've got rails models that look something like class Article < ActiveRecord::Base has_many :versions has_one :primary_version, class_name:"Version", foreign_key: :primary_id delegate ...
0
votes
1answer
44 views

Can't Retrieve Model Data

I'm starting to use Ember.js with Rails 3.2.13 through the ember-rails gem. I am unable to access data through the browser console with the following command: var posts = App.Post.find(); It ...
0
votes
1answer
30 views

EmberJS: Updating property inside object

Little and strange issue. I have an array of objects. Here is my controller. AmbiantBox.AmbiantsController = Ember.ArrayController.extend({ myArray: [], fillData: function(){ //loop ...
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 ...
2
votes
0answers
41 views

How should 'conventional' Ember-friendly APIs be designed for creation of mutually dependent parent and child models?

I'm building a Rails app with an Ember front-end. I'm trying hard to ensure that the API is as plain, vanilla, RESTful and conventional as possible, in the Rails/Ember spirit. I'm confused as to how ...
1
vote
2answers
65 views

Formatting Rabl for Ember or Mapping Ember to Rabl?

My rails app used to produce JSON that looked like this: {"paintings": [ {"id":1,"name":"a"}, {"id":2,"name":"b"} ] } I added rabl json formatting, and now the json looks like this: [ ...
0
votes
1answer
59 views

EmberJS, Loading first object on page load

Hopefully, a simple question and must have a simple answer but i have wasted almost 3hrs in getting out of this issue. I have a user model. I want to load the first user from DB and show it on first ...
0
votes
1answer
79 views

How to get parent id when creating a child ember js

I want to set parent_id in child records. My models are Recipe (id, title) and Ingredients(id, about, recipe_id). I have a form where i create recipe with many ingredients. All works well but i ...
0
votes
0answers
72 views

Setting the parent id with has many ember js

I have 2 models Recipe and Ingredient. They have has many and belongs to association. Recipe : Id, title. Ingredient: id, name, recipe_id I create nested form with recipe and ingredient. I can set ...
1
vote
1answer
114 views

What's the right way to delete a record in Ember Data revision 12?

I'm using revision 12 of Ember Data. I've got a simple method on an ArrayController that tries to delete a single record, and is called from an action in a template: deleteFact: function(fact) { ...
0
votes
1answer
74 views

How can you sideload multiple instances of a model with a belongs_to association?

I'm using rails / ember / ember-data, and trying to sideload multiple associations. App.Plan = DS.Model.extend({ schedule: DS.belongsTo('App.Schedule'), questions: DS.hasMany('App.Question') }); ...
1
vote
1answer
123 views

how to communicate with Rails in Ember

Let me explain shortly what I mean. I'm writing an app that makes use of Ember and Rails. Every employee can give other co-workers a kudo. He can't know how many others received. I can only know how ...
0
votes
0answers
76 views

How should I establish references to Ember Data models based on association attributes?

I have two Ember models: Event and Schedule. Each event has a schedule, which includes a start time. Events will be presented with a calendar display: if the user clicks a given day, the events ...
1
vote
1answer
54 views

How do I track Em.Store dirtiness in ember.js

I'm trying to track the presence of dirty records in my Ember store. I want to have a 'save' button with a linked property in order to disable the button whenever there are no records pending update. ...
1
vote
1answer
390 views

Ember data has many relationships

This is a question concerning my understanding. In rails, when you setup a has_many-belongs_to association between two models, parent and children, the id is stored on only the children. If you want ...
1
vote
3answers
563 views

Rails + Ember.js + Devise freelance journalist app - data scoping

Apologies, I have been in ember.js-land for so long, I'm fumbling Rails + active_model_serializers JSON api basics. So let's say I'm a freelance journalist and am building an app where a writer can ...
1
vote
1answer
160 views

createRecord for one-to-one relationship fails in ember-data RC1 (ember data revision 11)

createRecord never creates the belongsTo object. Is there any work around for creating the child model object in a case where there is such relation Post-> hasOne -> Comment and comment is ...
4
votes
1answer
498 views

Global variables in Ember

What would be the appropriate method for storing a global variable in Ember? For example, I have a User model in Ember, but I'd always like to know which specific instance of that model (including its ...
6
votes
1answer
261 views

Ember.js / Rails and associations: how to submit back to Rails a record and its associations?

Say you have two Rails models with association: class Foo < ActiveRecord::Base attr_accessible :name belongs_to :moo end class Moo < ActiveRecord::Base attr_accessible :name has_many ...
9
votes
3answers
1k views

creating a record with Ember.js & Ember-data & Rails and handling list of records

I'm building an app which has layout like below. I want to create a new post so I pressed 'new post button' and it took me to 'posts/new' route. My PostsNewRoute is like below (I followed the ...
0
votes
1answer
620 views

Ember.js ember-data findAll objects on the remote server

Folks! Are there any examples of how ember-data and remote back-end server works together (separate applications - client-side with ember.js and abstractive back-end server, Rails for example)? And ...
0
votes
3answers
622 views

has_many configuration for Ember-Data and Active Model Serializers with embedded IDs and sideloading

I know that Ember-Data is supposed to be compatible with Active Model Serializers by design, but they seem to be out of step on serializing has_many relationships with embedded IDs. For example, the ...
1
vote
0answers
95 views

Grouping calendar events by a date in Ember Data

A simple example here might be a list of events, such as a calendar, or just plain old listing that looks something like this Monday - event1 - event2 Tuesday - event3 I'm not sure how to ...
0
votes
0answers
79 views

How should I structure N:N relationships in Ember-Data?

I have two models, User and a Tournament, which are connected via Signup. Signup can have multiple states, so it is not simply user has a signup for tournament xyz, but rather user has signed up for a ...
3
votes
1answer
314 views

ember.js instantiate first record from ember-data query in router

I want to build a ember route that uses the attribute "name" to find a user record. The problem is the show action of the restful backend, it is not configured to use "name" as the finder. So I ...
0
votes
1answer
259 views

ember-data dynamic number of DS.attr 's

So i have a ember-data model and i want my users to be able to create different / more DS.attr per item and call them whatever they like. This will then send the json to rails server where i am ...

1 2
15 30 50 per page