learn-co-students / using-active-model-serializer-v-000 Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
Just a note: apparently I needed to restart the server after adding belongs_to :author to post_serializer.rb for the author's name to show up in the JSON. It was interesting to see how I needed to do the same thing for changing Active Record associations in Rails itself. You might want to add that to this lesson's text. Just sayin' :)
Hi guys,
https://github.com/Netflix/fast_jsonapi
https://medium.com/netflix-techblog/fast-json-api-serialization-with-ruby-on-rails-7c06578ad17f
This could be an improvement to the curriculum in that Fast JSON API
handles serializing up to 25 times faster than AMS.
It may not be as feature rich as AMS yet, but worth looking into and at the very least making a note about it in the lesson.
Cheers,
Mike
Students are not able to submit this lab in the Learn lesson page, as it requires tests to be passed and submitted in order to continue. A workaround is creating generic tests by running bundle exec rails g rspec:install
, then running learn
and learn submit
.
Post_spec.rb is has tests that require views, and there is no views folder.
The readme doesn't mention whether we should be adding view pages to make the tests pass or not.
Please check the code under "we need to get rid of the to_json stuff...."
It actually doesn't get rid of the to_json method.
"Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (~> 4.2) was resolved to 4.2.11.1, which depends on
bundler (>= 1.3.0, < 2.0)
Current Bundler version:
bundler (2.0.1)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running gem install bundler
?
Could not find gem 'bundler (>= 1.3.0, < 2.0)', which is required by gem 'rails (~> 4.2)', in
any of the sources.
Bundler could not find compatible versions for gem "ruby":
In Gemfile:
ruby
capybara was resolved to 3.16.1, which depends on
ruby (>= 2.4.0)
rails (~> 4.2) was resolved to 4.2.11.1, which depends on
ruby (>= 1.9.3)"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.