Dimitrie_David is seeking help understanding how store interactions between the client and server work in Discourse, particularly in the context of a custom plugin. They are confused about how Ember.js store calls Rails routes, especially since they don’t see direct AJAX calls in the Notebook plugin despite the use of RestModel. They note that server routes are defined in plugin.rb but don’t see the expected JSON endpoints being called. pfaffman suggests focusing on practical implementation, such as using add_to_serializer, and recommends studying Ember and Rails separately to better understand the integration. Dimitrie_David clarifies that their main goal is to understand the underlying mechanism of how Ember’s store communicates with Rails endpoints.
So I am trying to develop a custom plugin for my community. I have followed the tutorials for developing a plugin by @eviltrout and the tutorials still miss important information about communicating between the frontend and backend. I read that everything is ajax calls, but I have found a plugin example that I cannot understand.
I am looking at this Notebook plugin.
So I understand the server routes and the client controller. What I cannot understand is how are the server routes called, even if there are no ajax calls.
I think it has something to do with the RestModel that the note model extends.
Still I cannot find the implementantion that specifies what routes you have to define in the server so that the store in ember can use.