neo4j-meta_model 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 50f85430a3cc7e2acc8074edf4a6c2e9f48c4405
4
- data.tar.gz: 218c95ae1a5cfcc9c4d635224674093d98bdee1a
3
+ metadata.gz: 50d18168819549a01ce435b29697380f15acbbe0
4
+ data.tar.gz: 90ecf10a0ecf5e108e740a4c510af149d29157bf
5
5
  SHA512:
6
- metadata.gz: b0311c5159ed85369fd6e215f7781e23487fb3a422a8dc2b45a177b86f69a8beca91c9967d598d750f92cb664c5870de4553ac947154e02ee11530aaf15e9a4d
7
- data.tar.gz: 937993749747a17a1347249cb80322bf474fe202268d27a93e007a38ad6933c47705f480467ddb8ef8f2e7d0b8a9a5dc1ee5d8ba6fac19ecce7db4f7746faba5
6
+ metadata.gz: a98399eb241b2119c35dabfdbf1db2bed36125aadab6f250bd3281635eb767fdd3f67e1fe8607c761d4d8086d6258c5da56eacc1a55208e6ef08603426d155b1
7
+ data.tar.gz: 87482727f8cdf54cff1bd3ff1d077c5032005010fa2067d3ffc23a4d7a1d0131657e04dc42bd86fc9c959559ff95268b92f02b4ce103483b180f8524cf88d83e
@@ -168,9 +168,10 @@ ready = ->
168
168
  new_model_name: ''
169
169
 
170
170
  actions:
171
- add: (class_name) ->
172
- @store.createRecord('model', class_name: @new_model_name).save().then (record) =>
173
- @transitionToRoute 'models.edit', queryParams: class_name: record.class_name
171
+ add_model: (class_name) ->
172
+ @store.createRecord('model', class_name: @new_model_name).save().then (record) =>
173
+ console.log {queryParams: class_name: record.get('class_name')}
174
+ @transitionToRoute 'models.edit', record.get('class_name')
174
175
 
175
176
 
176
177
  MetaModel.ModelsEditRoute = Ember.Route.extend
@@ -217,7 +218,7 @@ ready = ->
217
218
  actions:
218
219
  create: (has_association) ->
219
220
  has_association.save().then (record) =>
220
- @transitionToRoute 'has_associations.index'
221
+ @transitionTo 'has_associations.index'
221
222
 
222
223
 
223
224
  $(document).ready ready
@@ -9,7 +9,7 @@
9
9
  label
10
10
  .col-sm-2.control-label Inherits from
11
11
  .col-sm-10
12
- view "select" content=models optionValuePath="content.id" optionLabelPath="content.class_name" selectionBinding="model.model.superclass_model" class="form-control"
12
+ view "select" content=model.models optionValuePath="content.id" optionLabelPath="content.class_name" selectionBinding="model.model.superclass_model" class="form-control"
13
13
 
14
14
  .properties.row
15
15
  h2
@@ -20,7 +20,7 @@
20
20
  label
21
21
  .col-sm-2.control-label ID Property
22
22
  .col-sm-10
23
- view "select" content=model.model.properties selectionBinding="model.model.id_property" optionValuePath="content.id" optionLabelPath="content.name" prompt="Please Select" class="form-control"
23
+ view "select" content=model.model.properties selectionBinding="model.model.id_property" optionValuePath="content.id" optionLabelPath="content.name" prompt="Auto" class="form-control"
24
24
 
25
25
  each property in model.model.properties
26
26
  .well.property.col-sm-6 class=property.isDirty:has-warning:
@@ -6,8 +6,7 @@
6
6
  .row
7
7
  div.col-sm-11
8
8
  = input valueBinding="new_model_name" class="form-control" placeholder="Model Name" class="form-control"
9
- a.btn.add-model-btn.col-sm-1 click='add add_model_name'
10
- | +
9
+ a.btn.btn-default.add-model-btn.col-sm-1 click="add_model add_model_name" +
11
10
 
12
11
 
13
12
  model-list node=model class="nested-list-group" id="model-list"
@@ -7,18 +7,24 @@ module Neo4j
7
7
  def destroy
8
8
  @property.destroy
9
9
 
10
+ create_models
11
+
10
12
  render json: nil
11
13
  end
12
14
 
13
15
  def create
14
16
  property = Property.create(property_params)
15
17
 
18
+ create_models
19
+
16
20
  render json: property
17
21
  end
18
22
 
19
23
  def update
20
24
  @property.update_attributes(property_params)
21
25
 
26
+ create_models
27
+
22
28
  render json: @property
23
29
  end
24
30
 
@@ -6,6 +6,8 @@ module Neo4j
6
6
 
7
7
  validates_inclusion_of :type, :in => %w( String DateTime Boolean Integer )
8
8
 
9
+ validates :name, presence: true
10
+
9
11
  has_one :in, :model, origin: :properties, model_class: 'Neo4j::MetaModel::Model'
10
12
 
11
13
  end
@@ -1,5 +1,5 @@
1
1
  module Neo4j
2
2
  module MetaModel
3
- VERSION = "0.3.0"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neo4j-meta_model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Underwood
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-03 00:00:00.000000000 Z
11
+ date: 2015-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -116,7 +116,6 @@ extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
118
  - MIT-LICENSE
119
- - README.rdoc
120
119
  - Rakefile
121
120
  - app/assets/javascripts/admin/models.js.coffee
122
121
  - app/assets/javascripts/meta_model.js.coffee
data/README.rdoc DELETED
@@ -1,20 +0,0 @@
1
- = Neo4j MetaModel
2
-
3
- == Usage
4
-
5
- `Gemfile`
6
-
7
- gem 'neo4j-meta_model', require: 'neo4j/meta_model'
8
-
9
- In your environment (`config/application.rb` or `config/environments/development.rb` for example)
10
-
11
- config.neo4j.session_type = :server_db
12
- config.neo4j.session_path = 'http://localhost:7474'
13
-
14
- `config/routes.rb`
15
-
16
- mount Neo4j::MetaModel::Engine => "/mount/path"
17
-
18
-
19
-
20
- This project rocks and uses MIT-LICENSE.