Closed betacar closed 11 years ago
Spine only communicates with your Rails application via the json API so only has access to those attributes you are passing back in your index action.
Try the following curl to see what is being returned in your index json response as it's probably not all the fields you require on that page.
curl --header "Accept: application/json" http://localhost:3000/your_resource
I'd recommend either customising the JSON response using either jbuilder (https://github.com/rails/jbuilder) or my preferred solution active_model_serializers (https://github.com/josevalim/active_model_serializers)
You may also need to make sure Spine knows what fields you want via the following in your model:
@configure 'ModelName', 'field1', 'field2', 'field3, etc
Hi! I post this question yesterday in the Google Group, but got no answers so far. :(
I don't know if it is an actual issue or simply SpineJS doesn't support attr_accesors, but when do in Model.all, it does not see virtual attributes, defined via ActiveRecord attr_accessor's.
Any ideas?