braise v0.3.0 Braise.AdapterTemplate
Constructs a string representation of an Ember-CLI Adapter given the passed in JSON Schema Resource.
Summary
Functions
Returns javascript string for pathForType property if it is the passed in resource_name is a snake case representation of multiple words. If it is one word, it replaces with nothing
Functions
Returns javascript string for pathForType property if it is the passed in resource_name is a snake case representation of multiple words. If it is one word, it replaces with nothing.
Examples
iex > template = “<%= path_for_type %>” iex > Braise.AdapterTemplate.path_for_type(“patient”) “” iex > Braise.AdapterTemplate.path_for_type(“staff_members”) “pathForType: function(type) { var underscorized = Ember.String.underscore(type); return Ember.String.pluralize(underscorized); }, “