2017-12-21 11:36:52 +01:00
2017-12-21 11:36:52 +01:00
2017-12-21 11:36:52 +01:00
2018-04-09 14:17:45 -03:00
2017-12-21 11:36:52 +01:00
2017-12-21 11:36:52 +01:00
2017-12-21 11:36:52 +01:00
2017-12-21 11:36:52 +01:00
2017-12-21 11:36:52 +01:00
2017-12-21 11:36:52 +01:00
2017-12-21 11:36:52 +01:00
2017-12-21 11:36:52 +01:00
2017-12-21 11:36:52 +01:00

Dunlop::Ember

This gem adds some context and support for connection ember applications

baic assumptions (for now (infrastructure is growing))

  • The model structure is non namespaced with api
  • The controllers have namespace Api, not versioned (controller level) api (yet):
      namespace :api, path: 'api/v1' do
        # ...api controller definitions...
      end
    
  • The inheritance column for STI models is sti_type in stead of the inconvenient chosen type:
    class ApplicationRecord < ActiveRecord::Base
      self.abstract_class = true
      self.inheritance_column = :sti_type
    end
    
  • There is a UserSerializer in the main_app, can be same as Api::User serializer app/serializers/user_serializer.rb:
      class UserSerializer < Api::UserSerializer
        # attribute :email
        # attribute :nickname
      end
    

Installation

Add this line to your application's Gemfile:

gem 'dunlop-ember'

And then execute:

$ bundle

Add the engine to your routes file

  mount Dunlop::Ember::Engine => '/app'
S
Description
No description provided
Readme 110 KiB
Languages
Ruby 84.1%
Slim 6.7%
HTML 5.4%
JavaScript 2.1%
CSS 1.5%
Other 0.2%