nostalgic 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 41ba1813bd79157148bad190413115f0bc853745
4
- data.tar.gz: 3cdfc14b2e871f2c7c14f63fc75760d33ecec056
3
+ metadata.gz: 5e26badaf65300d38f61266c2f100ef26b2373ab
4
+ data.tar.gz: ac2c04fac8a683751bb42b1fbb9e7d0eb4233e22
5
5
  SHA512:
6
- metadata.gz: af92321ab32f034f74aa6025c6df8426e407296fb90241456c7787793bb793ade5c66bf2e87cc0e99f0e435f9d417d5bc99c2c69a261987c0b162ac4a5edfdfc
7
- data.tar.gz: 06db584fdec446cdab5632eae2c72a662f3b0896e40c02ccf14b320b3f4ac8f4bfceb50cdf6c782b8060086808be103d1f9108183d20d7028d500b1f349b98b6
6
+ metadata.gz: 821b330a18dd8d26327123ea82dd39cce987a3eaf0cf575d2267996047a4a26496d666d088ea733c5975328289741d3418523fc981dad485ed0fd9aa02d0b69c
7
+ data.tar.gz: d69dfd09be25d0a29df67e703ff1a2bf11831406d775ef74d9ee5a6b78c466f83547ab2feeaca8026254b909bf8ec6bf9ded115518cf7fe199abef448cc7fcda
@@ -0,0 +1,30 @@
1
+ <table class="nostalgic">
2
+ <thead>
3
+ <tr>
4
+ <td>
5
+ <%= f.text_field attr, :class => css_class %>
6
+ </td>
7
+ <td>
8
+ <%= f.text_field "#{attr}_effective_at", :class => 'datepicker', :style => 'display: none;' %>
9
+ <%= image_tag 'nostalgic/list.png', :onclick => 'nostalgic.edit_nostalgic_attr(this); return false;' %>
10
+ </td>
11
+ </tr>
12
+ </thead>
13
+ <tbody style="display: none;">
14
+ <% f.object.public_send(attr.to_s.pluralize).each_with_index do |nostalgic_attr, i| %>
15
+ <%= f.fields_for "#{attr.to_s.pluralize}_attributes][#{i}]", nostalgic_attr do |f| %>
16
+ <tr>
17
+ <td>
18
+ <%= f.hidden_field :id %>
19
+ <%= f.hidden_field :_destroy %>
20
+ <%= f.text_field :value, :class => css_class, :disabled => true, :readonly => true %>
21
+ </td>
22
+ <td>
23
+ <%= f.text_field :effective_at, :class => 'datepicker', :disabled => true, :readonly => true %>
24
+ <%= image_tag 'nostalgic/minus.png', :onclick => 'nostalgic.remove_row(this); return false;' %>
25
+ </td>
26
+ </tr>
27
+ <% end %>
28
+ <% end %>
29
+ </tbody>
30
+ </table>
@@ -4,19 +4,7 @@ class ActionView::Helpers::FormBuilder
4
4
  include ActionView::Helpers::AssetTagHelper
5
5
 
6
6
  def nostalgic_text_field(method, options = {})
7
- text_field(method, append_nostalgic_clsss(options))
8
- end
9
-
10
- def nostalgic_number_field(method, options = {})
11
- number_field(method, append_nostalgic_clsss(options))
12
- end
13
-
14
- private
15
-
16
- def append_nostalgic_clsss(options = {})
17
- klass = options.fetch(:class, '').split
18
- klass.unshift('nostalgic')
19
- options.merge(:class => klass.join(' '))
7
+ @template.render 'nostalgic/text_field', :f => self, :attr => method, :css_class => options[:class]
20
8
  end
21
9
 
22
10
  end
@@ -1,3 +1,3 @@
1
1
  module Nostalgic
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
Binary file
@@ -5987,5 +5987,197 @@ NostalgicTest: test_that_it_has_a_version_number
5987
5987
   (0.0ms) begin transaction
5988
5988
  --------------------------------------------
5989
5989
  NostalgicTest: test_it_does_something_useful
5990
+ --------------------------------------------
5991
+  (0.0ms) rollback transaction
5992
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5993
+  (0.1ms) begin transaction
5994
+ Fixture Delete (0.2ms) DELETE FROM "nostalgic_attrs"
5995
+ Fixture Insert (0.1ms) INSERT INTO "nostalgic_attrs" ("id", "model_type", "model_id", "name", "value", "effective_at", "created_at", "updated_at") VALUES (1, 'User', 1, 'tel', '111-123-4567', '2016-08-16', '2016-09-16 05:15:42', '2016-09-16 05:15:42')
5996
+ Fixture Insert (0.1ms) INSERT INTO "nostalgic_attrs" ("id", "model_type", "model_id", "name", "value", "effective_at", "created_at", "updated_at") VALUES (2, 'User', 1, 'tel', '222-123-4567', '2016-09-16', '2016-09-16 05:15:42', '2016-09-16 05:15:42')
5997
+ Fixture Insert (0.0ms) INSERT INTO "nostalgic_attrs" ("id", "model_type", "model_id", "name", "value", "effective_at", "created_at", "updated_at") VALUES (3, 'User', 1, 'tel', '333-123-4567', '2016-09-17', '2016-09-16 05:15:42', '2016-09-16 05:15:42')
5998
+ Fixture Delete (0.0ms) DELETE FROM "users"
5999
+ Fixture Insert (0.0ms) INSERT INTO "users" ("id", "email", "tel", "created_at", "updated_at") VALUES (1, 'test1@example.com', '222-123-4567', '2016-09-16 05:15:42', '2016-09-16 05:15:42')
6000
+  (1.3ms) commit transaction
6001
+  (0.0ms) begin transaction
6002
+ -----------------------------------------
6003
+ Nostalgic::AttrTest: test_nostalgic_model
6004
+ -----------------------------------------
6005
+  (0.1ms) rollback transaction
6006
+  (0.0ms) begin transaction
6007
+ -------------------
6008
+ UserTest: test_tels
6009
+ -------------------
6010
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
6011
+ Nostalgic::Attr Load (0.2ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_id", 1], ["model_type", "User"], ["name", "tel"]]
6012
+  (0.1ms) SELECT COUNT(*) FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."name" = ? [["model_id", 1], ["model_type", "User"], ["name", "tel"]]
6013
+  (0.0ms) rollback transaction
6014
+  (0.0ms) begin transaction
6015
+ -----------------------
6016
+ UserTest: test_save_tel
6017
+ -----------------------
6018
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
6019
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_id", 1], ["model_type", "User"], ["name", "tel"]]
6020
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
6021
+  (0.0ms) SAVEPOINT active_record_1
6022
+ SQL (0.2ms) UPDATE "users" SET "tel" = ?, "updated_at" = ? WHERE "users"."id" = ? [["tel", "444-123-4567"], ["updated_at", "2016-09-16 05:15:42.257358"], ["id", 1]]
6023
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND "nostalgic_attrs"."effective_at" = ? ORDER BY "nostalgic_attrs"."id" ASC LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"], ["effective_at", "2016-09-16"]]
6024
+ SQL (0.1ms) UPDATE "nostalgic_attrs" SET "value" = ?, "updated_at" = ? WHERE "nostalgic_attrs"."id" = ? [["value", "444-123-4567"], ["updated_at", "2016-09-16 05:15:42.260240"], ["id", 2]]
6025
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6026
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
6027
+  (0.0ms) SAVEPOINT active_record_1
6028
+ SQL (0.1ms) UPDATE "users" SET "tel" = ?, "updated_at" = ? WHERE "users"."id" = ? [["tel", "555-123-4567"], ["updated_at", "2016-09-16 05:15:42.262167"], ["id", 1]]
6029
+ Nostalgic::Attr Load (0.0ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND "nostalgic_attrs"."effective_at" = ? ORDER BY "nostalgic_attrs"."id" ASC LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"], ["effective_at", "2016-09-18"]]
6030
+ SQL (0.1ms) INSERT INTO "nostalgic_attrs" ("model_type", "model_id", "name", "effective_at", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["model_type", "User"], ["model_id", 1], ["name", "tel"], ["effective_at", "2016-09-18"], ["value", "555-123-4567"], ["created_at", "2016-09-16 05:15:42.263384"], ["updated_at", "2016-09-16 05:15:42.263384"]]
6031
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6032
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
6033
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-17') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
6034
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-18') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
6035
+  (0.1ms) rollback transaction
6036
+  (0.0ms) begin transaction
6037
+ ------------------
6038
+ UserTest: test_tel
6039
+ ------------------
6040
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
6041
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_id", 1], ["model_type", "User"], ["name", "tel"]]
6042
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-15') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
6043
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
6044
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-17') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
6045
+  (0.0ms) rollback transaction
6046
+  (0.0ms) begin transaction
6047
+ ------------------------------------------------
6048
+ NostalgicTest: test_that_it_has_a_version_number
6049
+ ------------------------------------------------
6050
+  (0.0ms) rollback transaction
6051
+  (0.0ms) begin transaction
6052
+ --------------------------------------------
6053
+ NostalgicTest: test_it_does_something_useful
6054
+ --------------------------------------------
6055
+  (0.0ms) rollback transaction
6056
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
6057
+  (0.1ms) begin transaction
6058
+ Fixture Delete (0.3ms) DELETE FROM "nostalgic_attrs"
6059
+ Fixture Insert (0.1ms) INSERT INTO "nostalgic_attrs" ("id", "model_type", "model_id", "name", "value", "effective_at", "created_at", "updated_at") VALUES (1, 'User', 1, 'tel', '111-123-4567', '2016-08-16', '2016-09-16 06:42:45', '2016-09-16 06:42:45')
6060
+ Fixture Insert (0.1ms) INSERT INTO "nostalgic_attrs" ("id", "model_type", "model_id", "name", "value", "effective_at", "created_at", "updated_at") VALUES (2, 'User', 1, 'tel', '222-123-4567', '2016-09-16', '2016-09-16 06:42:45', '2016-09-16 06:42:45')
6061
+ Fixture Insert (0.0ms) INSERT INTO "nostalgic_attrs" ("id", "model_type", "model_id", "name", "value", "effective_at", "created_at", "updated_at") VALUES (3, 'User', 1, 'tel', '333-123-4567', '2016-09-17', '2016-09-16 06:42:45', '2016-09-16 06:42:45')
6062
+ Fixture Delete (0.0ms) DELETE FROM "users"
6063
+ Fixture Insert (0.0ms) INSERT INTO "users" ("id", "email", "tel", "created_at", "updated_at") VALUES (1, 'test1@example.com', '222-123-4567', '2016-09-16 06:42:45', '2016-09-16 06:42:45')
6064
+  (2.9ms) commit transaction
6065
+  (0.1ms) begin transaction
6066
+ -----------------------------------------
6067
+ Nostalgic::AttrTest: test_nostalgic_model
6068
+ -----------------------------------------
6069
+  (0.1ms) rollback transaction
6070
+  (0.0ms) begin transaction
6071
+ -----------------------
6072
+ UserTest: test_save_tel
6073
+ -----------------------
6074
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
6075
+ Nostalgic::Attr Load (0.2ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_id", 1], ["model_type", "User"], ["name", "tel"]]
6076
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
6077
+  (0.0ms) SAVEPOINT active_record_1
6078
+ SQL (0.3ms) UPDATE "users" SET "tel" = ?, "updated_at" = ? WHERE "users"."id" = ? [["tel", "444-123-4567"], ["updated_at", "2016-09-16 06:42:45.712741"], ["id", 1]]
6079
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND "nostalgic_attrs"."effective_at" = ? ORDER BY "nostalgic_attrs"."id" ASC LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"], ["effective_at", "2016-09-16"]]
6080
+ SQL (0.1ms) UPDATE "nostalgic_attrs" SET "value" = ?, "updated_at" = ? WHERE "nostalgic_attrs"."id" = ? [["value", "444-123-4567"], ["updated_at", "2016-09-16 06:42:45.715146"], ["id", 2]]
6081
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6082
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
6083
+  (0.0ms) SAVEPOINT active_record_1
6084
+ SQL (0.2ms) UPDATE "users" SET "tel" = ?, "updated_at" = ? WHERE "users"."id" = ? [["tel", "555-123-4567"], ["updated_at", "2016-09-16 06:42:45.717439"], ["id", 1]]
6085
+ Nostalgic::Attr Load (0.0ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND "nostalgic_attrs"."effective_at" = ? ORDER BY "nostalgic_attrs"."id" ASC LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"], ["effective_at", "2016-09-18"]]
6086
+ SQL (0.1ms) INSERT INTO "nostalgic_attrs" ("model_type", "model_id", "name", "effective_at", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["model_type", "User"], ["model_id", 1], ["name", "tel"], ["effective_at", "2016-09-18"], ["value", "555-123-4567"], ["created_at", "2016-09-16 06:42:45.719025"], ["updated_at", "2016-09-16 06:42:45.719025"]]
6087
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6088
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
6089
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-17') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
6090
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-18') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
6091
+  (0.1ms) rollback transaction
6092
+  (0.0ms) begin transaction
6093
+ -------------------
6094
+ UserTest: test_tels
6095
+ -------------------
6096
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
6097
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_id", 1], ["model_type", "User"], ["name", "tel"]]
6098
+  (0.1ms) SELECT COUNT(*) FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."name" = ? [["model_id", 1], ["model_type", "User"], ["name", "tel"]]
6099
+  (0.0ms) rollback transaction
6100
+  (0.0ms) begin transaction
6101
+ ------------------
6102
+ UserTest: test_tel
6103
+ ------------------
6104
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
6105
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_id", 1], ["model_type", "User"], ["name", "tel"]]
6106
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-15') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
6107
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
6108
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-17') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
6109
+  (0.0ms) rollback transaction
6110
+  (0.0ms) begin transaction
6111
+ ------------------------------------------------
6112
+ NostalgicTest: test_that_it_has_a_version_number
6113
+ ------------------------------------------------
6114
+  (0.0ms) rollback transaction
6115
+  (0.0ms) begin transaction
6116
+ --------------------------------------------
6117
+ NostalgicTest: test_it_does_something_useful
6118
+ --------------------------------------------
6119
+  (0.1ms) rollback transaction
6120
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
6121
+  (0.1ms) begin transaction
6122
+ Fixture Delete (0.2ms) DELETE FROM "nostalgic_attrs"
6123
+ Fixture Insert (0.1ms) INSERT INTO "nostalgic_attrs" ("id", "model_type", "model_id", "name", "value", "effective_at", "created_at", "updated_at") VALUES (1, 'User', 1, 'tel', '111-123-4567', '2016-08-16', '2016-09-16 06:48:08', '2016-09-16 06:48:08')
6124
+ Fixture Insert (0.1ms) INSERT INTO "nostalgic_attrs" ("id", "model_type", "model_id", "name", "value", "effective_at", "created_at", "updated_at") VALUES (2, 'User', 1, 'tel', '222-123-4567', '2016-09-16', '2016-09-16 06:48:08', '2016-09-16 06:48:08')
6125
+ Fixture Insert (0.0ms) INSERT INTO "nostalgic_attrs" ("id", "model_type", "model_id", "name", "value", "effective_at", "created_at", "updated_at") VALUES (3, 'User', 1, 'tel', '333-123-4567', '2016-09-17', '2016-09-16 06:48:08', '2016-09-16 06:48:08')
6126
+ Fixture Delete (0.0ms) DELETE FROM "users"
6127
+ Fixture Insert (0.0ms) INSERT INTO "users" ("id", "email", "tel", "created_at", "updated_at") VALUES (1, 'test1@example.com', '222-123-4567', '2016-09-16 06:48:08', '2016-09-16 06:48:08')
6128
+  (3.4ms) commit transaction
6129
+  (0.1ms) begin transaction
6130
+ -----------------------------------------
6131
+ Nostalgic::AttrTest: test_nostalgic_model
6132
+ -----------------------------------------
6133
+  (0.0ms) rollback transaction
6134
+  (0.0ms) begin transaction
6135
+ -----------------------
6136
+ UserTest: test_save_tel
6137
+ -----------------------
6138
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
6139
+ Nostalgic::Attr Load (0.2ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_id", 1], ["model_type", "User"], ["name", "tel"]]
6140
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
6141
+  (0.0ms) SAVEPOINT active_record_1
6142
+ SQL (0.1ms) UPDATE "users" SET "tel" = ?, "updated_at" = ? WHERE "users"."id" = ? [["tel", "444-123-4567"], ["updated_at", "2016-09-16 06:48:08.929290"], ["id", 1]]
6143
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND "nostalgic_attrs"."effective_at" = ? ORDER BY "nostalgic_attrs"."id" ASC LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"], ["effective_at", "2016-09-16"]]
6144
+ SQL (0.1ms) UPDATE "nostalgic_attrs" SET "value" = ?, "updated_at" = ? WHERE "nostalgic_attrs"."id" = ? [["value", "444-123-4567"], ["updated_at", "2016-09-16 06:48:08.931540"], ["id", 2]]
6145
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6146
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
6147
+  (0.0ms) SAVEPOINT active_record_1
6148
+ SQL (0.1ms) UPDATE "users" SET "tel" = ?, "updated_at" = ? WHERE "users"."id" = ? [["tel", "555-123-4567"], ["updated_at", "2016-09-16 06:48:08.933410"], ["id", 1]]
6149
+ Nostalgic::Attr Load (0.0ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND "nostalgic_attrs"."effective_at" = ? ORDER BY "nostalgic_attrs"."id" ASC LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"], ["effective_at", "2016-09-18"]]
6150
+ SQL (0.1ms) INSERT INTO "nostalgic_attrs" ("model_type", "model_id", "name", "effective_at", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["model_type", "User"], ["model_id", 1], ["name", "tel"], ["effective_at", "2016-09-18"], ["value", "555-123-4567"], ["created_at", "2016-09-16 06:48:08.934840"], ["updated_at", "2016-09-16 06:48:08.934840"]]
6151
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6152
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
6153
+ Nostalgic::Attr Load (0.2ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-17') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
6154
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-18') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
6155
+  (0.1ms) rollback transaction
6156
+  (0.0ms) begin transaction
6157
+ ------------------
6158
+ UserTest: test_tel
6159
+ ------------------
6160
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
6161
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_id", 1], ["model_type", "User"], ["name", "tel"]]
6162
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-15') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
6163
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
6164
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-17') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
6165
+  (0.0ms) rollback transaction
6166
+  (0.0ms) begin transaction
6167
+ -------------------
6168
+ UserTest: test_tels
6169
+ -------------------
6170
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
6171
+ Nostalgic::Attr Load (0.1ms) SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_id", 1], ["model_type", "User"], ["name", "tel"]]
6172
+  (0.1ms) SELECT COUNT(*) FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."name" = ? [["model_id", 1], ["model_type", "User"], ["name", "tel"]]
6173
+  (0.1ms) rollback transaction
6174
+  (0.1ms) begin transaction
6175
+ ------------------------------------------------
6176
+ NostalgicTest: test_that_it_has_a_version_number
6177
+ ------------------------------------------------
6178
+  (0.0ms) rollback transaction
6179
+  (0.0ms) begin transaction
6180
+ --------------------------------------------
6181
+ NostalgicTest: test_it_does_something_useful
5990
6182
  --------------------------------------------
5991
6183
   (0.0ms) rollback transaction
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nostalgic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - ichy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-28 00:00:00.000000000 Z
11
+ date: 2016-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -64,14 +64,14 @@ dependencies:
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '10.0'
67
+ version: '11.0'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '10.0'
74
+ version: '11.0'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: sqlite3
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -105,6 +105,7 @@ files:
105
105
  - app/helpers/nostalgic/application_helper.rb
106
106
  - app/models/nostalgic/attr.rb
107
107
  - app/views/layouts/nostalgic/application.html.erb
108
+ - app/views/nostalgic/_text_field.html.erb
108
109
  - config/routes.rb
109
110
  - db/migrate/20160807101438_create_nostalgic_attrs.rb
110
111
  - db/migrate/20160816080815_change_column_created_at_on_nostalgic_attrs.rb