eac_rails_utils 0.11.4 → 0.12.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/app/helpers/eac_rails_utils/common_form_helper.rb +6 -2
  3. data/app/helpers/eac_rails_utils/common_form_helper/form_builder.rb +3 -3
  4. data/config/initializers/assets.rb +6 -0
  5. data/lib/assets/images/sort_asc.png +0 -0
  6. data/lib/assets/images/sort_asc_disabled.png +0 -0
  7. data/lib/assets/images/sort_both.png +0 -0
  8. data/lib/assets/images/sort_desc.png +0 -0
  9. data/lib/assets/images/sort_desc_disabled.png +0 -0
  10. data/lib/assets/javascripts/dataTables.bootstrap.min.js +14 -0
  11. data/lib/assets/javascripts/datatables.min.js +212 -0
  12. data/lib/assets/javascripts/eac_rails_utils.js +2 -1
  13. data/lib/assets/stylesheets/dataTables.bootstrap.min.css +1 -0
  14. data/lib/assets/stylesheets/datatables.min.css +13 -0
  15. data/lib/assets/stylesheets/eac_rails_utils.scss +2 -1
  16. data/lib/eac_rails_utils/models/tableless.rb +10 -0
  17. data/lib/eac_rails_utils/models/validations.rb +71 -0
  18. data/lib/eac_rails_utils/version.rb +1 -1
  19. data/test/dummy/app/models/user.rb +0 -4
  20. data/test/dummy/bin/rails +6 -0
  21. data/test/dummy/db/migrate/20160415125333_create_users.rb +3 -1
  22. data/test/dummy/db/migrate/20160415143123_create_jobs.rb +3 -1
  23. data/test/dummy/db/migrate/20160415143229_add_job_to_users.rb +3 -1
  24. metadata +35 -17
  25. data/lib/assets/javascripts/jquery.dataTables.min.js +0 -164
  26. data/lib/assets/stylesheets/jquery.dataTables.min.css +0 -1
  27. data/lib/eac_rails_utils/models/attribute_required.rb +0 -43
  28. data/test/helpers/eac_rails_utils/common_form_helper_test.rb +0 -33
  29. data/test/lib/eac_rails_utils/models/attribute_required_test.rb +0 -42
  30. data/test/lib/eac_rails_utils/models/tableless_test.rb +0 -25
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'test_helper'
4
-
5
- module EacRailsUtils
6
- module Models
7
- class TablelessTest < ActiveSupport::TestCase
8
- class Stub < ::EacRailsUtils::Models::Tableless
9
- attribute :tempo, DateTime
10
- end
11
-
12
- test 'date time array values' do
13
- stub = Stub.new('tempo(1i)' => '9', 'tempo(2i)' => '10', 'tempo(3i)' => '11',
14
- 'tempo(4i)' => '12', 'tempo(5i)' => '13', 'tempo(6i)' => '14')
15
- assert stub.tempo.is_a?(DateTime), "Class: |#{stub.tempo.class}|, Value: |#{stub.tempo}|"
16
- assert_equal 9, stub.tempo.year, 'Year'
17
- assert_equal 10, stub.tempo.month, 'Month'
18
- assert_equal 11, stub.tempo.day, 'Day'
19
- assert_equal 12, stub.tempo.hour, 'Hour'
20
- assert_equal 13, stub.tempo.minute, 'Minute'
21
- assert_equal 14, stub.tempo.second, 'Second'
22
- end
23
- end
24
- end
25
- end