tramway-core 1.17.1 → 1.17.1.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
  SHA256:
3
- metadata.gz: 4eb727078bfed96a01a6730fbc8e529cc8ad32ff1214e6032a38ca50ba482eea
4
- data.tar.gz: df33625fbd52d7072883ead0ba561c9d0b4c0e3504dc8413d945a2c7b9ebe2da
3
+ metadata.gz: 4be07671b875ed3901b13904f9d54f3915ab5c4c42d637609a25bebee8b233a0
4
+ data.tar.gz: 77d1050db409315611f0fda8586c20cd15aa9b85e49d23f86ebc995556e420da
5
5
  SHA512:
6
- metadata.gz: b49d4439ca1f4e2d5320edb0e65c9eba652a5b5f378b0ac9d42c9e5442582d07ceae9968733a28f915199ea86286b8b5560903b2176d0d39e747ad8249bb87cc
7
- data.tar.gz: 75a7a039ffaa3de0c247a893daec0475d3ed9d16a39b7157df88c4ef46754b283515f7df017fff0a608f6bcbd9c77a5225a5070a3b60375500648fc4c3409929
6
+ metadata.gz: 875d00ccf2b6cdfa9bdb7fb64ab77b60b517be9f4ae24f856b5e79e2e90c068d97f074ea4df90b70f70457dbbbd955525d850f3f6a5939ba404eec020d144fc6
7
+ data.tar.gz: 3c0ffdef1b9dba8d41353908a82d2841879b9490d191e10ca017ed16d6b14bbabceeb5da27318dbf1939203820eed1d3227980e59f0410864e74785e48d85f68
data/README.md CHANGED
@@ -106,6 +106,39 @@ Something like this:
106
106
  copy_to_clipboard "some_id" # some_id is HTML id of element. Content of this element will be copied to the clipboard after pressing the button
107
107
  ```
108
108
 
109
+ ## How to create model that will be an Application Model for the Tramway
110
+
111
+ #### 1. Generate model that you to use. We create Organization, for example
112
+
113
+ ```shell
114
+ rails g model organization name:text public_name:text tagline:text address:text phone:text coordinates:point, state: text # remember! State field is required, if you use tramway-admin
115
+ rails db:migrate
116
+ ```
117
+
118
+ #### 2. Add model_class to Initializer
119
+
120
+ ```ruby
121
+ Tramway::Core.initialize_application model_class: Organization
122
+ ```
123
+
124
+ #### 3. Create 1 instance of Organization model
125
+
126
+ ```ruby
127
+ rails c
128
+ Organization.create! public_name: 'Tramway', name: :organization, tagline: 'Tramway is not buggy, LOL!'
129
+ ```
130
+
131
+ #### 4. Add model to singleton to the `tramway-admin` admin panel to be able to change its data
132
+
133
+ ```ruby
134
+ Tramway::Admin.set_singleton_models Organization, project: :organization # now you should use organization.name here
135
+ ```
136
+
137
+ #### 5. Then continue configuration of your model in admin panel with tramway-admin gem [instruction, starting from point 8](https://github.com/ulmic/tramway-dev/tree/develop/tramway-admin#8-configurate-navbar)
138
+
139
+ #### 6. Now you are able to change your application main info in admin panel
140
+
141
+ ## In Russian
109
142
 
110
143
  # Базовые классы
111
144
 
@@ -28,7 +28,7 @@ $(document).ready(function() {
28
28
  console.log('You should set `window.current_locale` before all Javascript code');
29
29
  }
30
30
 
31
- if ($('.date_picker').length == 0) {
31
+ if ($('.date_picker').length != 0) {
32
32
  $('.date_picker').datepicker({
33
33
  format: window.current_locale.date_format,
34
34
  language: window.current_locale.locale
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Core
5
- VERSION = '1.17.1'
5
+ VERSION = '1.17.1.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.17.1
4
+ version: 1.17.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-09 00:00:00.000000000 Z
11
+ date: 2020-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: audited