سؤال

I have a Locations controller and Location model I want to use the the Location model in another controller but calling

geddy.models.Locations.all(...);

does not work. It says Locations is undefined.

How do I make it load the model manually? Or should I create a function in the Locations controller to grab the data using a request on the client or a call directly to the controller on the sever?

هل كانت مفيدة؟

المحلول

Looks like you're pluralizing Locations when it should be singular: Location - hope this helps.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top