discuss 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/app/models/discuss/message.rb +5 -1
- data/db/migrate/20130419055252_setup_discuss.rb +3 -3
- data/lib/discuss/version.rb +1 -1
- data/test/dummy/config/environments/production.rb +1 -1
- data/test/dummy/config/environments/test.rb +1 -1
- data/test/dummy/config/initializers/simple_form.rb +169 -0
- data/test/dummy/config/locales/simple_form.en.yml +31 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20130428235128_create_users.rb +1 -1
- data/test/dummy/db/migrate/20130611002502_setup_discuss.discuss.rb +2 -2
- data/test/dummy/db/schema.rb +7 -7
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/lib/templates/erb/scaffold/_form.html.erb +13 -0
- data/test/dummy/log/development.log +92 -20
- data/test/dummy/log/test.log +324 -12709
- data/test/unit/discuss/message_test.rb +12 -0
- metadata +42 -168
- data/test/dummy/tmp/cache/assets/development/sprockets/0a28667732e1be8938cde061b6f996df +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0ddd7cc29057a69bd29fde03bf0f4c00 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0de2f69502366965bb7fae2623bc190c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0ee691067e6ec8f03df58bc94badd25d +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1b77abb6bee52fa8d68ee7e81077ff20 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/271bb8f72971af6089be8d1b85788bec +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2a499e57eb2664f139ab0e74571faa77 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/32b6af14546cb11e773fb3799f041132 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4728f8b9616c35f685674fbeecaa3c47 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4e9a3e121da30d3a85273a5c283da214 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5620ff4659033b350ea3031ecaeb5127 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/596293af7e4dcfa45880435ae753f876 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/614995c5e7b1b4f5b12ce060404706cc +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6b9e24a8aad25948823e1a93c8be731e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/78a00003621b318a297e05cfedb0d1fd +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/794654d117cd2ec6a9a00e485d9f4485 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/79ae3a9f48e9b9e8ef2922c844b1895f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9b5889bea21f2af8068646890752932c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9fd02d20091838d6411df2d23a5364d5 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a02345b542298f25d3f701ee680c44c0 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a80359c0e09ddf510ce63de09a368d4c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ad2a9bfe4169e0a5bc66efd35c83fe38 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/b1794788ec8ce362aceaffa31c7381e9 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/b284f477944d67f25c0672dba1a2dab4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/b2b1f16cf54d69c151ca7f42fb2f8381 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/b4767dfdb540517d26dc8c5365736f53 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/bab78b46d2a6282e5df747dd8b6d5abf +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/c9a09977565da30179ad7fdb9f79ae0d +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d9c8047218dc90a46a6725543638de45 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e5b181eb056bbd6ffad37ed146b0342e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/0a28667732e1be8938cde061b6f996df +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/0bbd99475c9b1a9e3af33bd8fd9a9d5e +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/0dca329dc00bb87d07c7d256e56a0afe +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/0ddd7cc29057a69bd29fde03bf0f4c00 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/0de2f69502366965bb7fae2623bc190c +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/1040973b3a0918cb84ae47f03e63e382 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/1b77abb6bee52fa8d68ee7e81077ff20 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/271bb8f72971af6089be8d1b85788bec +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/32b6af14546cb11e773fb3799f041132 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/4728f8b9616c35f685674fbeecaa3c47 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/5620ff4659033b350ea3031ecaeb5127 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/596293af7e4dcfa45880435ae753f876 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/78a00003621b318a297e05cfedb0d1fd +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/794654d117cd2ec6a9a00e485d9f4485 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/79ae3a9f48e9b9e8ef2922c844b1895f +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/9b5889bea21f2af8068646890752932c +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/9fd02d20091838d6411df2d23a5364d5 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/a02345b542298f25d3f701ee680c44c0 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/a80359c0e09ddf510ce63de09a368d4c +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/ad2a9bfe4169e0a5bc66efd35c83fe38 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/bab78b46d2a6282e5df747dd8b6d5abf +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c431ce936c5235a2a5a4d15d322d80bb +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c9a09977565da30179ad7fdb9f79ae0d +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d9c8047218dc90a46a6725543638de45 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
M2Y3Y2VjMTQ1Njk3NTRhNTQxNWNhZDhjNTIyMGViMzljOWNlZTA2MDVlNzM1
|
10
|
-
YzU0ZWVjMGQzMTVhY2E0YWQ3MzVlMDM0NTQyOTUyYWJlNjJjN2JmOWJhZmVh
|
11
|
-
YWVlZTAyYjcwYTJiZThmM2Y5YjJlYWFhZjJjNDEzYTRiNDg1ODI=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZGNlOGVjODQ2YjRkNGM3YTZmMjA1MjBiZDU1MzYyNThjZjJkZWNmODkzNmY5
|
14
|
-
Yjc4ODVjM2NhZTVmYzlkYjI5Y2RhOTAyYWU4YTgyYmE5OWM3YzRkZWNjZDNh
|
15
|
-
YjkyOGExZTdiMzg0NDUzMTg0MTYxZmVmODIxMzRjNTFhZDhiNTc=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 581b0b64f4fdbe5213b87498e977bca6b98bceb0
|
4
|
+
data.tar.gz: 199677608634a91e456c8bf5b8b65ba83e5e445b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4ef820e5ef28964c670e2ad72f2a31180b3d453eb671202210b2a23f2b301e54d1a11596b7736275155b82738315d434fdcdd3fda4090c7c89f485473138c412
|
7
|
+
data.tar.gz: 89c13ecbfaa3d7df11425b9ed126bf28700bdf26025d01db138d15c1440269f242b0d863f894e339aa4d6739c5d02da3c198b2d9ac744801a793fae74b8c1f3f
|
@@ -4,9 +4,9 @@ class SetupDiscuss < ActiveRecord::Migration
|
|
4
4
|
create_table :discuss_messages do |t|
|
5
5
|
t.string :subject
|
6
6
|
t.text :body
|
7
|
-
t.integer :user_id
|
7
|
+
t.integer :user_id, null: false
|
8
8
|
t.string :ancestry
|
9
|
-
t.
|
9
|
+
t.text :draft_recipient_ids
|
10
10
|
t.datetime :sent_at
|
11
11
|
t.datetime :received_at
|
12
12
|
t.datetime :read_at
|
@@ -14,7 +14,7 @@ class SetupDiscuss < ActiveRecord::Migration
|
|
14
14
|
t.datetime :deleted_at
|
15
15
|
t.boolean :editable, default: true
|
16
16
|
|
17
|
-
t.timestamps
|
17
|
+
t.timestamps null: false
|
18
18
|
end
|
19
19
|
add_index :discuss_messages, :user_id
|
20
20
|
add_index :discuss_messages, :ancestry
|
data/lib/discuss/version.rb
CHANGED
@@ -20,7 +20,7 @@ Dummy::Application.configure do
|
|
20
20
|
# config.action_dispatch.rack_cache = true
|
21
21
|
|
22
22
|
# Disable Rails's static asset server (Apache or nginx will already do this).
|
23
|
-
config.
|
23
|
+
config.serve_static_files = false
|
24
24
|
|
25
25
|
# Compress JavaScripts and CSS.
|
26
26
|
config.assets.js_compressor = :uglifier
|
@@ -13,7 +13,7 @@ Dummy::Application.configure do
|
|
13
13
|
config.eager_load = false
|
14
14
|
|
15
15
|
# Configure static asset server for tests with Cache-Control for performance.
|
16
|
-
config.
|
16
|
+
config.serve_static_files = true
|
17
17
|
config.static_cache_control = "public, max-age=3600"
|
18
18
|
|
19
19
|
# Show full error reports and disable caching.
|
@@ -0,0 +1,169 @@
|
|
1
|
+
# Use this setup block to configure all options available in SimpleForm.
|
2
|
+
SimpleForm.setup do |config|
|
3
|
+
# Wrappers are used by the form builder to generate a
|
4
|
+
# complete input. You can remove any component from the
|
5
|
+
# wrapper, change the order or even add your own to the
|
6
|
+
# stack. The options given below are used to wrap the
|
7
|
+
# whole input.
|
8
|
+
config.wrappers :default, class: :input,
|
9
|
+
hint_class: :field_with_hint, error_class: :field_with_errors do |b|
|
10
|
+
## Extensions enabled by default
|
11
|
+
# Any of these extensions can be disabled for a
|
12
|
+
# given input by passing: `f.input EXTENSION_NAME => false`.
|
13
|
+
# You can make any of these extensions optional by
|
14
|
+
# renaming `b.use` to `b.optional`.
|
15
|
+
|
16
|
+
# Determines whether to use HTML5 (:email, :url, ...)
|
17
|
+
# and required attributes
|
18
|
+
b.use :html5
|
19
|
+
|
20
|
+
# Calculates placeholders automatically from I18n
|
21
|
+
# You can also pass a string as f.input placeholder: "Placeholder"
|
22
|
+
b.use :placeholder
|
23
|
+
|
24
|
+
## Optional extensions
|
25
|
+
# They are disabled unless you pass `f.input EXTENSION_NAME => true`
|
26
|
+
# to the input. If so, they will retrieve the values from the model
|
27
|
+
# if any exists. If you want to enable any of those
|
28
|
+
# extensions by default, you can change `b.optional` to `b.use`.
|
29
|
+
|
30
|
+
# Calculates maxlength from length validations for string inputs
|
31
|
+
# and/or database column lengths
|
32
|
+
b.optional :maxlength
|
33
|
+
|
34
|
+
# Calculate minlength from length validations for string inputs
|
35
|
+
b.optional :minlength
|
36
|
+
|
37
|
+
# Calculates pattern from format validations for string inputs
|
38
|
+
b.optional :pattern
|
39
|
+
|
40
|
+
# Calculates min and max from length validations for numeric inputs
|
41
|
+
b.optional :min_max
|
42
|
+
|
43
|
+
# Calculates readonly automatically from readonly attributes
|
44
|
+
b.optional :readonly
|
45
|
+
|
46
|
+
## Inputs
|
47
|
+
b.use :label_input
|
48
|
+
b.use :hint, wrap_with: { tag: :span, class: :hint }
|
49
|
+
b.use :error, wrap_with: { tag: :span, class: :error }
|
50
|
+
|
51
|
+
## full_messages_for
|
52
|
+
# If you want to display the full error message for the attribute, you can
|
53
|
+
# use the component :full_error, like:
|
54
|
+
#
|
55
|
+
# b.use :full_error, wrap_with: { tag: :span, class: :error }
|
56
|
+
end
|
57
|
+
|
58
|
+
# The default wrapper to be used by the FormBuilder.
|
59
|
+
config.default_wrapper = :default
|
60
|
+
|
61
|
+
# Define the way to render check boxes / radio buttons with labels.
|
62
|
+
# Defaults to :nested for bootstrap config.
|
63
|
+
# inline: input + label
|
64
|
+
# nested: label > input
|
65
|
+
config.boolean_style = :nested
|
66
|
+
|
67
|
+
# Default class for buttons
|
68
|
+
config.button_class = 'btn'
|
69
|
+
|
70
|
+
# Method used to tidy up errors. Specify any Rails Array method.
|
71
|
+
# :first lists the first message for each field.
|
72
|
+
# Use :to_sentence to list all errors for each field.
|
73
|
+
# config.error_method = :first
|
74
|
+
|
75
|
+
# Default tag used for error notification helper.
|
76
|
+
config.error_notification_tag = :div
|
77
|
+
|
78
|
+
# CSS class to add for error notification helper.
|
79
|
+
config.error_notification_class = 'error_notification'
|
80
|
+
|
81
|
+
# ID to add for error notification helper.
|
82
|
+
# config.error_notification_id = nil
|
83
|
+
|
84
|
+
# Series of attempts to detect a default label method for collection.
|
85
|
+
# config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
|
86
|
+
|
87
|
+
# Series of attempts to detect a default value method for collection.
|
88
|
+
# config.collection_value_methods = [ :id, :to_s ]
|
89
|
+
|
90
|
+
# You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
|
91
|
+
# config.collection_wrapper_tag = nil
|
92
|
+
|
93
|
+
# You can define the class to use on all collection wrappers. Defaulting to none.
|
94
|
+
# config.collection_wrapper_class = nil
|
95
|
+
|
96
|
+
# You can wrap each item in a collection of radio/check boxes with a tag,
|
97
|
+
# defaulting to :span.
|
98
|
+
# config.item_wrapper_tag = :span
|
99
|
+
|
100
|
+
# You can define a class to use in all item wrappers. Defaulting to none.
|
101
|
+
# config.item_wrapper_class = nil
|
102
|
+
|
103
|
+
# How the label text should be generated altogether with the required text.
|
104
|
+
# config.label_text = lambda { |label, required, explicit_label| "#{required} #{label}" }
|
105
|
+
|
106
|
+
# You can define the class to use on all labels. Default is nil.
|
107
|
+
# config.label_class = nil
|
108
|
+
|
109
|
+
# You can define the default class to be used on forms. Can be overriden
|
110
|
+
# with `html: { :class }`. Defaulting to none.
|
111
|
+
# config.default_form_class = nil
|
112
|
+
|
113
|
+
# You can define which elements should obtain additional classes
|
114
|
+
# config.generate_additional_classes_for = [:wrapper, :label, :input]
|
115
|
+
|
116
|
+
# Whether attributes are required by default (or not). Default is true.
|
117
|
+
# config.required_by_default = true
|
118
|
+
|
119
|
+
# Tell browsers whether to use the native HTML5 validations (novalidate form option).
|
120
|
+
# These validations are enabled in SimpleForm's internal config but disabled by default
|
121
|
+
# in this configuration, which is recommended due to some quirks from different browsers.
|
122
|
+
# To stop SimpleForm from generating the novalidate option, enabling the HTML5 validations,
|
123
|
+
# change this configuration to true.
|
124
|
+
config.browser_validations = false
|
125
|
+
|
126
|
+
# Collection of methods to detect if a file type was given.
|
127
|
+
# config.file_methods = [ :mounted_as, :file?, :public_filename ]
|
128
|
+
|
129
|
+
# Custom mappings for input types. This should be a hash containing a regexp
|
130
|
+
# to match as key, and the input type that will be used when the field name
|
131
|
+
# matches the regexp as value.
|
132
|
+
# config.input_mappings = { /count/ => :integer }
|
133
|
+
|
134
|
+
# Custom wrappers for input types. This should be a hash containing an input
|
135
|
+
# type as key and the wrapper that will be used for all inputs with specified type.
|
136
|
+
# config.wrapper_mappings = { string: :prepend }
|
137
|
+
|
138
|
+
# Namespaces where SimpleForm should look for custom input classes that
|
139
|
+
# override default inputs.
|
140
|
+
# config.custom_inputs_namespaces << "CustomInputs"
|
141
|
+
|
142
|
+
# Default priority for time_zone inputs.
|
143
|
+
# config.time_zone_priority = nil
|
144
|
+
|
145
|
+
# Default priority for country inputs.
|
146
|
+
# config.country_priority = nil
|
147
|
+
|
148
|
+
# When false, do not use translations for labels.
|
149
|
+
# config.translate_labels = true
|
150
|
+
|
151
|
+
# Automatically discover new inputs in Rails' autoload path.
|
152
|
+
# config.inputs_discovery = true
|
153
|
+
|
154
|
+
# Cache SimpleForm inputs discovery
|
155
|
+
# config.cache_discovery = !Rails.env.development?
|
156
|
+
|
157
|
+
# Default class for inputs
|
158
|
+
# config.input_class = nil
|
159
|
+
|
160
|
+
# Define the default class of the input wrapper of the boolean input.
|
161
|
+
config.boolean_label_class = 'checkbox'
|
162
|
+
|
163
|
+
# Defines if the default input wrapper class should be included in radio
|
164
|
+
# collection wrappers.
|
165
|
+
# config.include_default_input_wrapper_class = true
|
166
|
+
|
167
|
+
# Defines which i18n scope will be used in Simple Form.
|
168
|
+
# config.i18n_scope = 'simple_form'
|
169
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
en:
|
2
|
+
simple_form:
|
3
|
+
"yes": 'Yes'
|
4
|
+
"no": 'No'
|
5
|
+
required:
|
6
|
+
text: 'required'
|
7
|
+
mark: '*'
|
8
|
+
# You can uncomment the line below if you need to overwrite the whole required html.
|
9
|
+
# When using html, text and mark won't be used.
|
10
|
+
# html: '<abbr title="required">*</abbr>'
|
11
|
+
error_notification:
|
12
|
+
default_message: "Please review the problems below:"
|
13
|
+
# Examples
|
14
|
+
# labels:
|
15
|
+
# defaults:
|
16
|
+
# password: 'Password'
|
17
|
+
# user:
|
18
|
+
# new:
|
19
|
+
# email: 'E-mail to sign in.'
|
20
|
+
# edit:
|
21
|
+
# email: 'E-mail.'
|
22
|
+
# hints:
|
23
|
+
# defaults:
|
24
|
+
# username: 'User name to sign in.'
|
25
|
+
# password: 'No special characters, please.'
|
26
|
+
# include_blanks:
|
27
|
+
# defaults:
|
28
|
+
# age: 'Rather not say'
|
29
|
+
# prompts:
|
30
|
+
# defaults:
|
31
|
+
# age: 'Select your age'
|
Binary file
|
@@ -5,7 +5,7 @@ class SetupDiscuss < ActiveRecord::Migration
|
|
5
5
|
create_table :discuss_messages do |t|
|
6
6
|
t.string :subject
|
7
7
|
t.text :body
|
8
|
-
t.integer :user_id
|
8
|
+
t.integer :user_id, null: false
|
9
9
|
t.string :ancestry
|
10
10
|
t.string :draft_recipient_ids
|
11
11
|
t.datetime :sent_at
|
@@ -15,7 +15,7 @@ class SetupDiscuss < ActiveRecord::Migration
|
|
15
15
|
t.datetime :deleted_at
|
16
16
|
t.boolean :editable, default: true
|
17
17
|
|
18
|
-
t.timestamps
|
18
|
+
t.timestamps null: false
|
19
19
|
end
|
20
20
|
add_index :discuss_messages, :user_id
|
21
21
|
add_index :discuss_messages, :ancestry
|
data/test/dummy/db/schema.rb
CHANGED
@@ -13,10 +13,10 @@
|
|
13
13
|
|
14
14
|
ActiveRecord::Schema.define(version: 20130611002502) do
|
15
15
|
|
16
|
-
create_table "discuss_messages", force:
|
16
|
+
create_table "discuss_messages", force: :cascade do |t|
|
17
17
|
t.string "subject"
|
18
18
|
t.text "body"
|
19
|
-
t.integer "user_id"
|
19
|
+
t.integer "user_id", null: false
|
20
20
|
t.string "ancestry"
|
21
21
|
t.string "draft_recipient_ids"
|
22
22
|
t.datetime "sent_at"
|
@@ -25,19 +25,19 @@ ActiveRecord::Schema.define(version: 20130611002502) do
|
|
25
25
|
t.datetime "trashed_at"
|
26
26
|
t.datetime "deleted_at"
|
27
27
|
t.boolean "editable", default: true
|
28
|
-
t.datetime "created_at"
|
29
|
-
t.datetime "updated_at"
|
28
|
+
t.datetime "created_at", null: false
|
29
|
+
t.datetime "updated_at", null: false
|
30
30
|
end
|
31
31
|
|
32
32
|
add_index "discuss_messages", ["ancestry"], name: "index_discuss_messages_on_ancestry"
|
33
33
|
add_index "discuss_messages", ["user_id"], name: "index_discuss_messages_on_user_id"
|
34
34
|
|
35
|
-
create_table "users", force:
|
35
|
+
create_table "users", force: :cascade do |t|
|
36
36
|
t.string "email"
|
37
37
|
t.string "first_name"
|
38
38
|
t.string "last_name"
|
39
|
-
t.datetime "created_at"
|
40
|
-
t.datetime "updated_at"
|
39
|
+
t.datetime "created_at", null: false
|
40
|
+
t.datetime "updated_at", null: false
|
41
41
|
end
|
42
42
|
|
43
43
|
end
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%%= simple_form_for(@<%= singular_table_name %>) do |f| %>
|
2
|
+
<%%= f.error_notification %>
|
3
|
+
|
4
|
+
<div class="form-inputs">
|
5
|
+
<%- attributes.each do |attribute| -%>
|
6
|
+
<%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> %>
|
7
|
+
<%- end -%>
|
8
|
+
</div>
|
9
|
+
|
10
|
+
<div class="form-actions">
|
11
|
+
<%%= f.button :submit %>
|
12
|
+
</div>
|
13
|
+
<%% end %>
|
@@ -1,25 +1,97 @@
|
|
1
|
-
[1m[
|
2
|
-
[1m[
|
3
|
-
[1m[
|
4
|
-
|
5
|
-
[1m[35m (0.1ms)[0m begin transaction
|
6
|
-
[1m[36m (0.4ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255), "first_name" varchar(255), "last_name" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
7
|
-
[1m[35mSQL (4.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130428235128"]]
|
8
|
-
[1m[36m (1.1ms)[0m [1mcommit transaction[0m
|
1
|
+
[1m[36mUser Load (2.4ms)[0m [1mSELECT "users".* FROM "users"[0m
|
2
|
+
[1m[36m (1.2ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
3
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
4
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
9
5
|
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
10
|
-
[1m[36m (2.4ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
11
|
-
[1m[35m (1.0ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
12
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
13
6
|
Migrating to CreateUsers (20130428235128)
|
14
|
-
[1m[
|
15
|
-
[1m[
|
16
|
-
[1m[
|
17
|
-
[1m[
|
7
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
8
|
+
[1m[35m (0.5ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar, "first_name" varchar, "last_name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
9
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20130428235128"]]
|
10
|
+
[1m[35m (0.9ms)[0m commit transaction
|
18
11
|
Migrating to SetupDiscuss (20130611002502)
|
19
|
-
[1m[
|
20
|
-
[1m[
|
21
|
-
[1m[
|
22
|
-
[1m[
|
12
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
13
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "discuss_messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subject" varchar, "body" text, "user_id" integer NOT NULL, "ancestry" varchar, "draft_recipient_ids" varchar, "sent_at" datetime, "received_at" datetime, "read_at" datetime, "trashed_at" datetime, "deleted_at" datetime, "editable" boolean DEFAULT 't', "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
14
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_discuss_messages_on_user_id" ON "discuss_messages" ("user_id")[0m
|
15
|
+
[1m[35m (0.3ms)[0m SELECT sql
|
16
|
+
FROM sqlite_master
|
17
|
+
WHERE name='index_discuss_messages_on_user_id' AND type='index'
|
18
|
+
UNION ALL
|
19
|
+
SELECT sql
|
20
|
+
FROM sqlite_temp_master
|
21
|
+
WHERE name='index_discuss_messages_on_user_id' AND type='index'
|
22
|
+
|
23
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_discuss_messages_on_ancestry" ON "discuss_messages" ("ancestry")[0m
|
23
24
|
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130611002502"]]
|
24
|
-
[1m[36m (
|
25
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
26
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
27
|
+
[1m[36m (0.2ms)[0m [1m SELECT sql
|
28
|
+
FROM sqlite_master
|
29
|
+
WHERE name='index_discuss_messages_on_ancestry' AND type='index'
|
30
|
+
UNION ALL
|
31
|
+
SELECT sql
|
32
|
+
FROM sqlite_temp_master
|
33
|
+
WHERE name='index_discuss_messages_on_ancestry' AND type='index'
|
34
|
+
[0m
|
35
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
36
|
+
FROM sqlite_master
|
37
|
+
WHERE name='index_discuss_messages_on_user_id' AND type='index'
|
38
|
+
UNION ALL
|
39
|
+
SELECT sql
|
40
|
+
FROM sqlite_temp_master
|
41
|
+
WHERE name='index_discuss_messages_on_user_id' AND type='index'
|
42
|
+
|
43
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
44
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
45
|
+
[1m[36m (0.3ms)[0m [1m SELECT sql
|
46
|
+
FROM sqlite_master
|
47
|
+
WHERE name='index_discuss_messages_on_ancestry' AND type='index'
|
48
|
+
UNION ALL
|
49
|
+
SELECT sql
|
50
|
+
FROM sqlite_temp_master
|
51
|
+
WHERE name='index_discuss_messages_on_ancestry' AND type='index'
|
52
|
+
[0m
|
53
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
54
|
+
FROM sqlite_master
|
55
|
+
WHERE name='index_discuss_messages_on_user_id' AND type='index'
|
56
|
+
UNION ALL
|
57
|
+
SELECT sql
|
58
|
+
FROM sqlite_temp_master
|
59
|
+
WHERE name='index_discuss_messages_on_user_id' AND type='index'
|
60
|
+
|
61
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations"[0m
|
62
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
25
63
|
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
64
|
+
[1m[36m (0.3ms)[0m [1m SELECT sql
|
65
|
+
FROM sqlite_master
|
66
|
+
WHERE name='index_discuss_messages_on_ancestry' AND type='index'
|
67
|
+
UNION ALL
|
68
|
+
SELECT sql
|
69
|
+
FROM sqlite_temp_master
|
70
|
+
WHERE name='index_discuss_messages_on_ancestry' AND type='index'
|
71
|
+
[0m
|
72
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
73
|
+
FROM sqlite_master
|
74
|
+
WHERE name='index_discuss_messages_on_user_id' AND type='index'
|
75
|
+
UNION ALL
|
76
|
+
SELECT sql
|
77
|
+
FROM sqlite_temp_master
|
78
|
+
WHERE name='index_discuss_messages_on_user_id' AND type='index'
|
79
|
+
|
80
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "discuss_messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subject" varchar, "body" text, "user_id" integer NOT NULL, "ancestry" varchar, "draft_recipient_ids" varchar, "sent_at" datetime, "received_at" datetime, "read_at" datetime, "trashed_at" datetime, "deleted_at" datetime, "editable" boolean DEFAULT 't', "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
81
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
82
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_discuss_messages_on_ancestry" ON "discuss_messages" ("ancestry")[0m
|
83
|
+
[1m[35m (0.4ms)[0m SELECT sql
|
84
|
+
FROM sqlite_master
|
85
|
+
WHERE name='index_discuss_messages_on_ancestry' AND type='index'
|
86
|
+
UNION ALL
|
87
|
+
SELECT sql
|
88
|
+
FROM sqlite_temp_master
|
89
|
+
WHERE name='index_discuss_messages_on_ancestry' AND type='index'
|
90
|
+
|
91
|
+
[1m[36m (1.1ms)[0m [1mCREATE INDEX "index_discuss_messages_on_user_id" ON "discuss_messages" ("user_id")[0m
|
92
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar, "first_name" varchar, "last_name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
93
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
94
|
+
[1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
95
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
96
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20130611002502')
|
97
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20130428235128')[0m
|