class DrySerialization::JsonapiSerializer::InstallGenerator
Public Instance Methods
install_jsonapi_serializer()
click to toggle source
Add blueprinter gem to gemfile after dry_serialization declaration and bundles the newly declared gem
# File lib/generators/dry_serialization/jsonapi_serializer/install_generator.rb, line 9 def install_jsonapi_serializer remove_other_supported_gems(SERIALIZERS[:blueprinter], SERIALIZERS[:ams]) puts "Installing #{SERIALIZERS[:jsonapi_serializer]}..." insert_into_file('Gemfile', "\ngem 'jsonapi_serializer'", after: "gem 'dry_serialization'") run 'bundle install' helper_include(SERIALIZERS[:jsonapi_serializer]) end