Sha256: bfa4e6681303c395a93ab097dd09a790b2cc07e641c0c9e00a7166b24ac9fdc9

Contents?: true

Size: 604 Bytes

Versions: 9

Compression:

Stored size: 604 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': [],
    # }
  }
)
<% end -%>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
live_record-0.3.2 lib/live_record/generators/templates/javascript.coffee.rb
live_record-0.3.1 lib/live_record/generators/templates/javascript.coffee.rb
live_record-0.3.0 lib/live_record/generators/templates/javascript.coffee.rb
live_record-0.2.8 lib/live_record/generators/templates/javascript.coffee.rb
live_record-0.2.7 lib/live_record/generators/templates/javascript.coffee.rb
live_record-0.2.6 lib/live_record/generators/templates/javascript.coffee.rb
live_record-0.2.5 lib/live_record/generators/templates/javascript.coffee.rb
live_record-0.2.4 lib/live_record/generators/templates/javascript.coffee.rb
live_record-0.2.3 lib/live_record/generators/templates/javascript.coffee.rb