active_record_date_formatted 0.0.3 → 0.0.4

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: 6843eebb6fa49764baf4d4afdeaee6a99f42ceb7
4
- data.tar.gz: 7b43f78a4b25553c1e0e8347ff9a09cf78abd17b
3
+ metadata.gz: 5f1714731a486b45eb5bda36c470a942744d91d1
4
+ data.tar.gz: b9e927ceb04f81c374fe0b6c73fe0bcac8a5ed93
5
5
  SHA512:
6
- metadata.gz: f4a57a982dfb05a7217068ea136200303a0cd17743bc7bbef0bcce916556ebdd3d0d815e93ede1c4a0e63227d699b1a5cfb28c69f90c911bda73e2c598d25198
7
- data.tar.gz: 931258ceb23354e0c2603d39a9903c8fd8c921a877d97f666b4846629ef033afd03c652668f586295b8fed5415cff355eca4489411ecf6c42f5261114c53a397
6
+ metadata.gz: 4e63838b7f4597367c8fa069634c424f996eefe4dcd402b295a2768dd4f311a2a8c1a42dc4103ff598df14a10a6522fadd663875284a75cce94a923312e75505
7
+ data.tar.gz: e04301a6165c9b3bc2ad42935aafc1c8af94b7cf0e47714d7866a2c17b2a5f1109221b3f64a516a31d3fb129a21f3091d46a4bffcee9d098447165862eb0c9d3
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
- h1. ActiveRecordDateFormatted
1
+ # ActiveRecordDateFormatted
2
2
 
3
- h2. Installation
3
+ ## Installation
4
4
 
5
- Add to your Gemfile: gem 'active_record_date_formatted'
5
+ Add to your Gemfile: **gem 'active_record_date_formatted'**
6
6
 
7
7
  And that's it.
8
8
 
@@ -10,10 +10,11 @@ Now for every active record model's date attribute, you have two additional meth
10
10
  - birthdate_formatted
11
11
  - birthdate_formatted=(formatted_date)
12
12
 
13
- The formatted methods use *date.formats.default* format.
13
+ The formatted methods use **date.formats.default** format.
14
14
 
15
15
  For example for german locale:
16
16
 
17
+ <pre>
17
18
  de:
18
19
  date:
19
20
  formats:
@@ -25,9 +26,10 @@ Person.first.birthdate_formatted = "24.04.1981"
25
26
  I18n.locale = :en
26
27
  Person.first.birthdate_formatted # => "1981-04-12"
27
28
  Person.first.birthdate_formatted = "1981-04-24"
29
+ </pre>
28
30
 
29
31
  Now you can use the *_formatted in your views, for example when using date pickers.
30
32
 
31
- h2. Licence
33
+ ## Licence
32
34
 
33
35
  This project uses MIT-LICENSE.
@@ -1,3 +1,3 @@
1
1
  module ActiveRecordDateFormatted
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -927,3 +927,46 @@ ActiveRecordDateFormattedTest: test_date_formatted_getter_german
927
927
  Person Load (0.1ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1
928
928
  Person Load (0.1ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1
929
929
   (1.4ms) rollback transaction
930
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
931
+  (0.1ms) begin transaction
932
+ ---------------------------------------------------------
933
+ ActiveRecordDateFormattedTest: test_date_formatted_getter
934
+ ---------------------------------------------------------
935
+  (0.1ms) SAVEPOINT active_record_1
936
+ SQL (0.5ms) INSERT INTO "people" ("birth_date", "created_at", "updated_at") VALUES (?, ?, ?) [["birth_date", "1971-02-18"], ["created_at", "2015-09-11 15:56:41.132420"], ["updated_at", "2015-09-11 15:56:41.132420"]]
937
+  (0.0ms) RELEASE SAVEPOINT active_record_1
938
+ Person Load (0.1ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1
939
+ Person Load (0.1ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1
940
+  (1.4ms) rollback transaction
941
+  (0.1ms) begin transaction
942
+ --------------------------------------------------
943
+ ActiveRecordDateFormattedTest: test_module_defined
944
+ --------------------------------------------------
945
+  (0.0ms) SAVEPOINT active_record_1
946
+ SQL (0.3ms) INSERT INTO "people" ("birth_date", "created_at", "updated_at") VALUES (?, ?, ?) [["birth_date", "1971-02-18"], ["created_at", "2015-09-11 15:56:41.142590"], ["updated_at", "2015-09-11 15:56:41.142590"]]
947
+  (0.0ms) RELEASE SAVEPOINT active_record_1
948
+  (1.3ms) rollback transaction
949
+  (0.1ms) begin transaction
950
+ ----------------------------------------------------------------
951
+ ActiveRecordDateFormattedTest: test_date_formatted_getter_german
952
+ ----------------------------------------------------------------
953
+  (0.0ms) SAVEPOINT active_record_1
954
+ SQL (0.3ms) INSERT INTO "people" ("birth_date", "created_at", "updated_at") VALUES (?, ?, ?) [["birth_date", "1971-02-18"], ["created_at", "2015-09-11 15:56:41.146012"], ["updated_at", "2015-09-11 15:56:41.146012"]]
955
+  (0.1ms) RELEASE SAVEPOINT active_record_1
956
+ Person Load (0.1ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1
957
+ Person Load (0.1ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1
958
+  (1.5ms) rollback transaction
959
+  (0.1ms) begin transaction
960
+ ----------------------------------------------------------------
961
+ ActiveRecordDateFormattedTest: test_date_formatted_setter_german
962
+ ----------------------------------------------------------------
963
+  (0.1ms) SAVEPOINT active_record_1
964
+ SQL (0.4ms) INSERT INTO "people" ("birth_date", "created_at", "updated_at") VALUES (?, ?, ?) [["birth_date", "1971-02-18"], ["created_at", "2015-09-11 15:56:41.151047"], ["updated_at", "2015-09-11 15:56:41.151047"]]
965
+  (0.1ms) RELEASE SAVEPOINT active_record_1
966
+ Person Load (0.1ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1
967
+  (0.0ms) SAVEPOINT active_record_1
968
+ SQL (0.4ms) UPDATE "people" SET "birth_date" = ?, "updated_at" = ? WHERE "people"."id" = ? [["birth_date", "1971-02-24"], ["updated_at", "2015-09-11 15:56:41.153683"], ["id", 1]]
969
+  (0.0ms) RELEASE SAVEPOINT active_record_1
970
+ Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1
971
+ Person Load (0.1ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1
972
+  (1.5ms) rollback transaction
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_date_formatted
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Jancev