discuss 0.0.5 → 0.0.6

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.
Files changed (84) hide show
  1. checksums.yaml +6 -14
  2. data/app/models/discuss/message.rb +5 -1
  3. data/db/migrate/20130419055252_setup_discuss.rb +3 -3
  4. data/lib/discuss/version.rb +1 -1
  5. data/test/dummy/config/environments/production.rb +1 -1
  6. data/test/dummy/config/environments/test.rb +1 -1
  7. data/test/dummy/config/initializers/simple_form.rb +169 -0
  8. data/test/dummy/config/locales/simple_form.en.yml +31 -0
  9. data/test/dummy/db/development.sqlite3 +0 -0
  10. data/test/dummy/db/migrate/20130428235128_create_users.rb +1 -1
  11. data/test/dummy/db/migrate/20130611002502_setup_discuss.discuss.rb +2 -2
  12. data/test/dummy/db/schema.rb +7 -7
  13. data/test/dummy/db/test.sqlite3 +0 -0
  14. data/test/dummy/lib/templates/erb/scaffold/_form.html.erb +13 -0
  15. data/test/dummy/log/development.log +92 -20
  16. data/test/dummy/log/test.log +324 -12709
  17. data/test/unit/discuss/message_test.rb +12 -0
  18. metadata +42 -168
  19. data/test/dummy/tmp/cache/assets/development/sprockets/0a28667732e1be8938cde061b6f996df +0 -0
  20. data/test/dummy/tmp/cache/assets/development/sprockets/0ddd7cc29057a69bd29fde03bf0f4c00 +0 -0
  21. data/test/dummy/tmp/cache/assets/development/sprockets/0de2f69502366965bb7fae2623bc190c +0 -0
  22. data/test/dummy/tmp/cache/assets/development/sprockets/0ee691067e6ec8f03df58bc94badd25d +0 -0
  23. data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  24. data/test/dummy/tmp/cache/assets/development/sprockets/1b77abb6bee52fa8d68ee7e81077ff20 +0 -0
  25. data/test/dummy/tmp/cache/assets/development/sprockets/271bb8f72971af6089be8d1b85788bec +0 -0
  26. data/test/dummy/tmp/cache/assets/development/sprockets/2a499e57eb2664f139ab0e74571faa77 +0 -0
  27. data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  28. data/test/dummy/tmp/cache/assets/development/sprockets/32b6af14546cb11e773fb3799f041132 +0 -0
  29. data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  30. data/test/dummy/tmp/cache/assets/development/sprockets/4728f8b9616c35f685674fbeecaa3c47 +0 -0
  31. data/test/dummy/tmp/cache/assets/development/sprockets/4e9a3e121da30d3a85273a5c283da214 +0 -0
  32. data/test/dummy/tmp/cache/assets/development/sprockets/5620ff4659033b350ea3031ecaeb5127 +0 -0
  33. data/test/dummy/tmp/cache/assets/development/sprockets/596293af7e4dcfa45880435ae753f876 +0 -0
  34. data/test/dummy/tmp/cache/assets/development/sprockets/614995c5e7b1b4f5b12ce060404706cc +0 -0
  35. data/test/dummy/tmp/cache/assets/development/sprockets/6b9e24a8aad25948823e1a93c8be731e +0 -0
  36. data/test/dummy/tmp/cache/assets/development/sprockets/78a00003621b318a297e05cfedb0d1fd +0 -0
  37. data/test/dummy/tmp/cache/assets/development/sprockets/794654d117cd2ec6a9a00e485d9f4485 +0 -0
  38. data/test/dummy/tmp/cache/assets/development/sprockets/79ae3a9f48e9b9e8ef2922c844b1895f +0 -0
  39. data/test/dummy/tmp/cache/assets/development/sprockets/9b5889bea21f2af8068646890752932c +0 -0
  40. data/test/dummy/tmp/cache/assets/development/sprockets/9fd02d20091838d6411df2d23a5364d5 +0 -0
  41. data/test/dummy/tmp/cache/assets/development/sprockets/a02345b542298f25d3f701ee680c44c0 +0 -0
  42. data/test/dummy/tmp/cache/assets/development/sprockets/a80359c0e09ddf510ce63de09a368d4c +0 -0
  43. data/test/dummy/tmp/cache/assets/development/sprockets/ad2a9bfe4169e0a5bc66efd35c83fe38 +0 -0
  44. data/test/dummy/tmp/cache/assets/development/sprockets/b1794788ec8ce362aceaffa31c7381e9 +0 -0
  45. data/test/dummy/tmp/cache/assets/development/sprockets/b284f477944d67f25c0672dba1a2dab4 +0 -0
  46. data/test/dummy/tmp/cache/assets/development/sprockets/b2b1f16cf54d69c151ca7f42fb2f8381 +0 -0
  47. data/test/dummy/tmp/cache/assets/development/sprockets/b4767dfdb540517d26dc8c5365736f53 +0 -0
  48. data/test/dummy/tmp/cache/assets/development/sprockets/bab78b46d2a6282e5df747dd8b6d5abf +0 -0
  49. data/test/dummy/tmp/cache/assets/development/sprockets/c9a09977565da30179ad7fdb9f79ae0d +0 -0
  50. data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  51. data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  52. data/test/dummy/tmp/cache/assets/development/sprockets/d9c8047218dc90a46a6725543638de45 +0 -0
  53. data/test/dummy/tmp/cache/assets/development/sprockets/e5b181eb056bbd6ffad37ed146b0342e +0 -0
  54. data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  55. data/test/dummy/tmp/cache/assets/test/sprockets/0a28667732e1be8938cde061b6f996df +0 -0
  56. data/test/dummy/tmp/cache/assets/test/sprockets/0bbd99475c9b1a9e3af33bd8fd9a9d5e +0 -0
  57. data/test/dummy/tmp/cache/assets/test/sprockets/0dca329dc00bb87d07c7d256e56a0afe +0 -0
  58. data/test/dummy/tmp/cache/assets/test/sprockets/0ddd7cc29057a69bd29fde03bf0f4c00 +0 -0
  59. data/test/dummy/tmp/cache/assets/test/sprockets/0de2f69502366965bb7fae2623bc190c +0 -0
  60. data/test/dummy/tmp/cache/assets/test/sprockets/1040973b3a0918cb84ae47f03e63e382 +0 -0
  61. data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  62. data/test/dummy/tmp/cache/assets/test/sprockets/1b77abb6bee52fa8d68ee7e81077ff20 +0 -0
  63. data/test/dummy/tmp/cache/assets/test/sprockets/271bb8f72971af6089be8d1b85788bec +0 -0
  64. data/test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  65. data/test/dummy/tmp/cache/assets/test/sprockets/32b6af14546cb11e773fb3799f041132 +0 -0
  66. data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  67. data/test/dummy/tmp/cache/assets/test/sprockets/4728f8b9616c35f685674fbeecaa3c47 +0 -0
  68. data/test/dummy/tmp/cache/assets/test/sprockets/5620ff4659033b350ea3031ecaeb5127 +0 -0
  69. data/test/dummy/tmp/cache/assets/test/sprockets/596293af7e4dcfa45880435ae753f876 +0 -0
  70. data/test/dummy/tmp/cache/assets/test/sprockets/78a00003621b318a297e05cfedb0d1fd +0 -0
  71. data/test/dummy/tmp/cache/assets/test/sprockets/794654d117cd2ec6a9a00e485d9f4485 +0 -0
  72. data/test/dummy/tmp/cache/assets/test/sprockets/79ae3a9f48e9b9e8ef2922c844b1895f +0 -0
  73. data/test/dummy/tmp/cache/assets/test/sprockets/9b5889bea21f2af8068646890752932c +0 -0
  74. data/test/dummy/tmp/cache/assets/test/sprockets/9fd02d20091838d6411df2d23a5364d5 +0 -0
  75. data/test/dummy/tmp/cache/assets/test/sprockets/a02345b542298f25d3f701ee680c44c0 +0 -0
  76. data/test/dummy/tmp/cache/assets/test/sprockets/a80359c0e09ddf510ce63de09a368d4c +0 -0
  77. data/test/dummy/tmp/cache/assets/test/sprockets/ad2a9bfe4169e0a5bc66efd35c83fe38 +0 -0
  78. data/test/dummy/tmp/cache/assets/test/sprockets/bab78b46d2a6282e5df747dd8b6d5abf +0 -0
  79. data/test/dummy/tmp/cache/assets/test/sprockets/c431ce936c5235a2a5a4d15d322d80bb +0 -0
  80. data/test/dummy/tmp/cache/assets/test/sprockets/c9a09977565da30179ad7fdb9f79ae0d +0 -0
  81. data/test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  82. data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  83. data/test/dummy/tmp/cache/assets/test/sprockets/d9c8047218dc90a46a6725543638de45 +0 -0
  84. data/test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- OTk1ZGI4MWVlN2E3MmI1ZTM2MDAzNzczYWRmM2Y0NjkyNGM5ODA0OQ==
5
- data.tar.gz: !binary |-
6
- N2RhYTNjYTA1ZTJmYjcwODc0ZGM0OTI0NTA4N2ZiYjA4YTdmMGNmOQ==
7
- !binary "U0hBNTEy":
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
@@ -44,7 +44,11 @@ module Discuss
44
44
  end
45
45
 
46
46
  def sender
47
- sent? ? user : parent.user
47
+ if sent?
48
+ user
49
+ else
50
+ parent ? parent.user : user
51
+ end
48
52
  end
49
53
 
50
54
  def recipients
@@ -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.string :draft_recipient_ids
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
@@ -1,3 +1,3 @@
1
1
  module Discuss
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -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.serve_static_assets = false
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.serve_static_assets = true
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'
@@ -5,7 +5,7 @@ class CreateUsers < ActiveRecord::Migration
5
5
  t.string :first_name
6
6
  t.string :last_name
7
7
 
8
- t.timestamps
8
+ t.timestamps null: false
9
9
  end
10
10
  end
11
11
  end
@@ -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
@@ -13,10 +13,10 @@
13
13
 
14
14
  ActiveRecord::Schema.define(version: 20130611002502) do
15
15
 
16
- create_table "discuss_messages", force: true do |t|
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: true do |t|
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
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
-  (1.5ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
2
-  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
3
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
4
- Migrating to CreateUsers (20130428235128)
5
-  (0.1ms) begin transaction
6
-  (0.4ms) CREATE 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) 
7
- SQL (4.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130428235128"]]
8
-  (1.1ms) commit transaction
1
+ User Load (2.4ms) SELECT "users".* FROM "users"
2
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
3
+  (0.1ms) select sqlite_version(*)
4
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
9
5
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
10
-  (2.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
11
-  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
12
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
13
6
  Migrating to CreateUsers (20130428235128)
14
-  (0.1ms) begin transaction
15
-  (0.3ms) CREATE 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) 
16
- SQL (1.7ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130428235128"]]
17
-  (1.1ms) commit transaction
7
+  (0.1ms) begin transaction
8
+  (0.5ms) 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
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130428235128"]]
10
+  (0.9ms) commit transaction
18
11
  Migrating to SetupDiscuss (20130611002502)
19
-  (0.1ms) begin transaction
20
-  (0.4ms) CREATE TABLE "discuss_messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subject" varchar(255), "body" text, "user_id" integer, "ancestry" varchar(255), "draft_recipient_ids" varchar(255), "sent_at" datetime, "received_at" datetime, "read_at" datetime, "trashed_at" datetime, "deleted_at" datetime, "editable" boolean DEFAULT 't', "created_at" datetime, "updated_at" datetime) 
21
-  (0.1ms) CREATE INDEX "index_discuss_messages_on_user_id" ON "discuss_messages" ("user_id")
22
-  (0.1ms) CREATE INDEX "index_discuss_messages_on_ancestry" ON "discuss_messages" ("ancestry")
12
+  (0.1ms) begin transaction
13
+  (0.3ms) 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
+  (0.1ms) CREATE INDEX "index_discuss_messages_on_user_id" ON "discuss_messages" ("user_id")
15
+  (0.3ms) 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
+  (0.1ms) CREATE INDEX "index_discuss_messages_on_ancestry" ON "discuss_messages" ("ancestry")
23
24
  SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130611002502"]]
24
-  (1.1ms) commit transaction
25
+  (0.7ms) commit transaction
26
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
27
+  (0.2ms)  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
+ 
35
+  (0.1ms) 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
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
44
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
45
+  (0.3ms)  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
+ 
53
+  (0.1ms) 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
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
62
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
25
63
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
64
+  (0.3ms)  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
+ 
72
+  (0.1ms) 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
+  (1.1ms) 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) 
81
+  (0.2ms) select sqlite_version(*)
82
+  (1.0ms) CREATE INDEX "index_discuss_messages_on_ancestry" ON "discuss_messages" ("ancestry")
83
+  (0.4ms) 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
+  (1.1ms) CREATE INDEX "index_discuss_messages_on_user_id" ON "discuss_messages" ("user_id")
92
+  (0.8ms) 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
+  (0.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
94
+  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
95
+  (0.1ms) SELECT version FROM "schema_migrations"
96
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20130611002502')
97
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20130428235128')