Sha256: f2031cef9b84587e73f09daf673e6dc51e39f34ab3bcc05a052c75e3b08a9925

Contents?: true

Size: 799 Bytes

Versions: 6

Compression:

Stored size: 799 Bytes

Contents

<% module_namespacing do -%>
LiveRecord.Model.create(
  {
    modelName: '<%= singular_table_name.camelcase %>',
    plugins: {
      # remove this line if you're not using LiveDOM
      LiveDOM: true
    },

    ## More configurations below. See https://github.com/jrpolidario/live_record#example-1---model
    # belongsTo: {
    #   user: { foreignKey: 'user_id', modelName: 'User' }
    # },
    # hasMany: {
    #   books: { foreignKey: '<%= singular_table_name %>_id', modelName: 'Book' }
    # },
    # callbacks: {
    #   'on:disconnect': [],
    #   'after:update': [],
    # },
    # classMethods: {
    #   someMethod: (arg1, arg2) ->
    #     return 'somevalue'
    # },
    # instanceMethods: {
    #   someMethod: (arg1, arg2) ->
    #     return 'somevalue'
    # }
  }
)
<% end -%>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
live_record-1.0.2 lib/live_record/generators/templates/javascript.coffee.rb
live_record-1.0.1 lib/live_record/generators/templates/javascript.coffee.rb
live_record-1.0.0 lib/live_record/generators/templates/javascript.coffee.rb
live_record-0.3.6 lib/live_record/generators/templates/javascript.coffee.rb
live_record-0.3.4 lib/live_record/generators/templates/javascript.coffee.rb
live_record-0.3.3 lib/live_record/generators/templates/javascript.coffee.rb