rails_sortable 0.1.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +61 -24
- data/app/helpers/sortable_helper.rb +4 -6
- data/app/models/rails_sortable/model.rb +8 -5
- data/lib/rails_sortable/core_ext/enumerable.rb +6 -0
- data/lib/rails_sortable/core_ext.rb +3 -0
- data/lib/rails_sortable/version.rb +1 -1
- data/lib/rails_sortable.rb +1 -0
- data/spec/dummy/app/models/sequenced_item.rb +1 -1
- data/spec/dummy/app/views/items/index.html.erb +2 -2
- data/spec/dummy/app/views/sequenced_items/index.html.erb +2 -2
- data/spec/dummy/config/application.rb +2 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20131223124841_create_items.rb +1 -1
- data/spec/dummy/db/migrate/20170414031946_create_sequenced_items.rb +1 -1
- data/spec/dummy/db/schema.rb +0 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +686 -0
- data/spec/dummy/log/test.log +7647 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-M/-MwqdQ791aPntbEy7upqu3cADI-2KlCz2SjOQXwCd5w.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/0l/0lxOLKgMUMzAFvW2sDd-e6N0cnDR_PNDv-s69MSMiAA.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/1U/1U1pW6Uavmef847C1JXIdugGlbThpoaH5psPBv7R_J8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/31/31pAh-ykal9wFBvxGXPlw8TvfVP9I3g8AKUN1RD12Sg.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5_/5_YaqD4YPAqkrxzucbFB0d7IJcA1OkWUzybswbWefwc.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/77/776QkbrTcZYapIcbwGFTJtbgfh3cNgMT2c40Aj54fEU.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7U/7UBkdE46evReoZt_EYaKUwH58UyqcXz2y56G9dIqFP0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8f/8fIg59WLGyiXkq1RifIbIftwSQZKF-yZ2EXsZMXMch8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9U/9U2DhKS6xwVOdGrAQv2FhUnh6toPdgGRab6NIRsXp0o.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ag/AgpGgXbfyusDXjo1mDj-AFk_o2SSeoZO0lEdU9qWQX8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Bq/BqBJyBS41Jda6NbagWARTtmiCR-quplnsjL7d5z4p1c.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Bq/bqKThELB3qgSQcjs5dN-vSX3A407npeY8MIKpowe-Js.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/C8/C8hb35kAhvJiAFUsoqojTrsfrThtdp49E4nptXI_9Ro.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/CO/COP5g_SpHcHL9NYeZARiQDwPnIZty47_OGxvjAnrncI.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Dm/DmmfrCpXtt74Hr6NO54lxyOCDv6klnDyBqeDFR7oDU8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Dm/dmwAuKE4eBzCm6glINJ_ZwcD69v9t8l15j03VzHLxh8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/E6/E6CVif4RjoY04O2IF5Vb4QI-F_S02jIpChkH6YLZy9A.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ei/Eiu0Y5dKtNlRmNbmh7sA6xxf5BCI-ijBOXcJG5XDPAQ.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Gn/GnyjUg0eyY4eXLM8LB7BH4Ivh2xVIcwH_qv7mwyyjJw.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/HF/HFuNhzNZA5ILxIzWi2wxnZ_uEYPrAQ4OVoo0Y_92muU.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Jc/JcODu6JBZielcrLviF0o_T1GbgKIhK-zRaK6x6QTozw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Jn/JnjBvfKtl8TXKycLjUNrFw0bedaarjPKagB7vF8TUK8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ND/NDJu7JZ4s949_mBSyh1RlDbvIA4g5-5pvgaOWqG-Ac0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/NW/NWqf7xq8uxCcCLqLyqR4P6Xdp7ptpiR-nfnIdZpLUKM.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/OX/OXQFRQZ5OA2i3YtnP1fZ96aWeUC3_IIqO4fAMdR9FsM.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Oq/Oq9qxOybVTkEsplZxHkAXQtRjPsCla5NvnuEBpzA6aQ.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Qn/QnVahtlgxWDe8pZzWsgQMPKPFKUVrX-zODRgJ88d8g0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/R6/R6jjGP-ss5qq0jCtD8DVMldYO5CZ3CnR8ATE0bBwS9s.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/RT/RtNDq2dTGBn8a9lKsp_NdLkLSZ_qC14uMcRAnJa8MwU.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/SE/SEOXTAR9ayZjI7koj_F8NhHi0BcVNcfS2CJoYYvgfmA.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/UG/UGUKHaW4DiFx1aZgMUpclbzKInIDVBd5f75rfkqDRd4.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Vi/VinvgmlVKmvmmSv0n3iGxgjUEMX6B95Jsp7rUJkKvxk.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/YC/YCmSRb5SEvvoBvnJsRlYJpjX4bDwV_X9TkGytX3NnRs.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Yu/yue8-Q5bNZaBmyxqsXfEfa-f2AFyNQfYiPjFz1iiOC8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Z9/Z9BQI9WcvV299qzaK1M_BzYQ0JyoibxRUHVkgjQAglI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ZJ/ZJ44p6_pZuT7WpBrGCBRBtJ5QdfNcMjNQvu5qqXgxDk.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/aN/aN7HmMd7uTy_8MNbMlPVBrUnBks5bEWJMA6PBRz6bHs.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/by/bycyWG1KvMAFy-MNbyR0Jg_fDRj_lPz1FTGz-a3lBuw.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/d2/d2Yn085-A4NAn9xG1tVfpAF_Wq_xF-41XbpMJWJrx3I.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ep/epOwUzkCBUUf3qec0T3hdrf2NnOzeQ6raN7_mH70hIE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fO/Fot3cRKzEJDZ24jtzhnIGTxk4y0oangfskCEIQhU5mM.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fR/fR7lphpj83NQV2tYMU8ejAZ8IE9LVsOaLLjXr3QB0hY.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/gP/gPOrGelZGMmC2JmWhxBVOrc1sFhQtfgSnODI-Ul_sWs.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/hj/Hj4c2gR3CanPccvkZw0kp49U1R-mtB9wIGo7YzEUtRY.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/l-/l-tlnwp5uJdRwxd_83TYgEcK2tKtc0BgtknMUirnIMU.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/lv/lvVdgHzQTW7MQ3US3THd4ZE84XRfWcPT5qwJLXv0rN4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/m2/m2egBUvfxGWpUmYKTgZQuNXHWm8EvHntYVaIlpLM38s.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nh/nh8v3yrwWXGoRhmmkfOR5UPo9GMZPUFyt6LSRdvHyy8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/o4/o4Y9F2XU_uVXmdHbLHiTSqN0NE0piayqn2EwMN4yDgQ.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/oE/OEkPR9rCjDF_RsHHp1mxYgYBdzX3EWkvcck8pAa7-cI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/oJ/oJCqbKqh-ra1_jrvq68KLQTNjUH6bSq5jguVUig8lcE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/pf/pfqGxtUxd_Aih4aBeO5sUUDN0-3Vb0S5_nqLjj0cMAw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/q6/q6BYa32YJF11eGVapO4ouNl6gayPIsARgMavlzZmoi0.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/s7/s7VWT9DZLFqtya2VSPGzhMBSY277k6KTrT8nUYpeBu8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uV/uV_S1Cg7y0O0HsF1rc8eYpK_AgSbsKuL5jH9NMfjv04.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/up/upVymLTBG2KFDubvLigJERLKkH6kU_CVWmn2lgOYg54.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uw/uWpRXEIJzFMcsSUwp-Vu5QLS3vWbos65wsNMgWi-9k0.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/vn/vnFhMxGWzyZFIqsnCGE3pR5PnSiBGsLvdsOfQccjeZ4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wv/wvLIhRJ2wqhPrnqvkacm2QHyG0rFmmf3VSAGNiZnOWU.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/x7/x7KkTV3ibfIEysLB_ug5bfmnn2VLV_BldukPR3EoPBk.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xb/xbyHnHRcdnYQamtz02quX36a2_ef91bDpDlDcKN9k8w.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xo/xomBLC8CXZdVx5BbdIwBVW9ROU-L7Lx6udDAW3t43I4.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xo/xox6GSP3_45BgwDA_Qsm5x9I4tMzd_-JBiArTeUVQQI.cache +0 -0
- data/spec/helpers/sortable_helper_spec.rb +1 -1
- data/spec/models/rails_sortable/model_spec.rb +13 -3
- data/spec/spec_helper.rb +0 -1
- metadata +93 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f87ea45db075e7775fe975f17a4efba046cc6390
|
4
|
+
data.tar.gz: 3e363558e6544afadf50af11e3f327d196db5b7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa5ae363dfd93a2bf1d28f9f9e4808a10b3dcb00e51efa37daa73c5c14603aa3086ca46af130648c59a318ce7b7bb7a0dc2dcd0b0c5bf18182a309497ed7a7f6
|
7
|
+
data.tar.gz: 527606581cafb9e132d87419bf146a0aad09b232daaa6c21c6675f16074bcb3a83480914a93f418d5d140b63a7f04b79e0eb2f6c895ff9ba378ffc70e8350ddb
|
data/README.md
CHANGED
@@ -1,31 +1,35 @@
|
|
1
1
|
# RailsSortable
|
2
|
+
[![Build Status](https://travis-ci.org/itmammoth/rails_sortable.svg?branch=use_travis_ci)](https://travis-ci.org/itmammoth/rails_sortable)
|
2
3
|
|
3
|
-
RailsSortable is a simple Rails gem that allows you to create a listing view with drag & drop sorting.
|
4
|
+
RailsSortable is a simple Rails gem that allows you to create a listing view with drag & drop sorting. The arranged order will be persisted in the table without any pain.
|
4
5
|
|
5
6
|
![RailsSortable](https://raw.githubusercontent.com/itmammoth/rails_sortable/master/rails_sortable.gif "RailsSortable")
|
6
7
|
|
7
|
-
|
8
|
+
# Setup
|
8
9
|
|
9
|
-
Add
|
10
|
+
Add the following to your `Gemfile` then run bundle to install them.
|
10
11
|
```
|
12
|
+
gem 'jquery-rails'
|
11
13
|
gem 'jquery-ui-rails'
|
12
14
|
gem 'rails_sortable'
|
13
15
|
```
|
14
16
|
|
15
|
-
And then add
|
17
|
+
And then add the following to the asset pipeline in the `application.js`:
|
16
18
|
```
|
19
|
+
//= require jquery
|
20
|
+
//= require jquery_ujs
|
17
21
|
//= require jquery-ui/widgets/sortable
|
18
22
|
//= require rails_sortable
|
19
23
|
```
|
20
24
|
|
21
|
-
|
25
|
+
# Usage
|
22
26
|
|
23
|
-
RailsSortable requires specific column on ActiveRecord Model for
|
27
|
+
RailsSortable requires a specific column on the ActiveRecord Model for its implementation.
|
24
28
|
|
25
|
-
For instance, the following migration indicates the case that you are attemtting to make Item model sortable.
|
29
|
+
For instance, the following migration indicates the case that you are attemtting to make `Item` model sortable.
|
26
30
|
|
27
31
|
```ruby
|
28
|
-
class CreateItems < ActiveRecord::Migration
|
32
|
+
class CreateItems < ActiveRecord::Migration[5.1]
|
29
33
|
def change
|
30
34
|
create_table :items do |t|
|
31
35
|
t.string :title
|
@@ -36,22 +40,31 @@ class CreateItems < ActiveRecord::Migration
|
|
36
40
|
end
|
37
41
|
end
|
38
42
|
```
|
39
|
-
and Item model
|
43
|
+
and `Item` model as
|
40
44
|
```ruby
|
41
|
-
class Item <
|
45
|
+
class Item < ApplicationRecord
|
42
46
|
include RailsSortable::Model
|
43
|
-
set_sortable :sort #
|
44
|
-
# If you
|
45
|
-
# set_sortable :sort,
|
47
|
+
set_sortable :sort # Indicate a sort column
|
48
|
+
# If you do NOT want timestamps to be updated on sorting, use the following option.
|
49
|
+
# set_sortable :sort, without_updating_timestamps: true
|
50
|
+
end
|
51
|
+
```
|
52
|
+
and `ItemsController` as
|
53
|
+
```ruby
|
54
|
+
class ItemsController < ApplicationController
|
55
|
+
def index
|
56
|
+
@items = Item.order(:sort).all
|
57
|
+
end
|
46
58
|
end
|
47
59
|
```
|
48
60
|
|
49
|
-
and
|
61
|
+
and the listing view (typically - index.html.erb) as
|
50
62
|
```erb
|
51
63
|
...
|
52
|
-
<
|
53
|
-
|
54
|
-
|
64
|
+
<table>
|
65
|
+
<tbody class="sortable"> <!-- sortable target -->
|
66
|
+
<% @items.each_with_sortable_id do |item, sortable_id| %>
|
67
|
+
<tr id="<%= sortable_id %>"> <!-- Needs id tag on sorting elements -->
|
55
68
|
<td><%= item.title %></td>
|
56
69
|
<td><%= item.sort %></td>
|
57
70
|
<td><%= link_to 'Show', item %></td>
|
@@ -64,14 +77,38 @@ and its listing view (typically - index.html.erb) is
|
|
64
77
|
...
|
65
78
|
```
|
66
79
|
|
67
|
-
finally,
|
80
|
+
finally, apply sortable with Javascript.
|
81
|
+
|
82
|
+
```javascript
|
83
|
+
$(function() {
|
84
|
+
$('.sortable').railsSortable();
|
85
|
+
});
|
86
|
+
```
|
87
|
+
|
88
|
+
# Javascript options
|
89
|
+
jQuery plugin `railsSortable` is just a wrapper of `jquery.ui.sortable`. therefore it accepts all of `sortbale` options.
|
90
|
+
|
91
|
+
see the [http://api.jqueryui.com/sortable/](http://api.jqueryui.com/sortable/) to get the details.
|
92
|
+
|
93
|
+
# Contribution
|
94
|
+
|
95
|
+
Fork it, then install required gems like below.
|
96
|
+
```bash
|
97
|
+
$ bundle install --path=vender/bundle
|
98
|
+
$ appraisal install
|
99
|
+
```
|
100
|
+
|
101
|
+
Please give me a PR freely.
|
102
|
+
|
103
|
+
### Testing
|
104
|
+
```bash
|
105
|
+
# Run server with rails 5.1 (rails42 & rails50 are also available)
|
106
|
+
$ appraisal rails51 spec/dummy/bin/rails s
|
68
107
|
|
69
|
-
|
70
|
-
|
71
|
-
$(".sortable").railsSortable()
|
108
|
+
# Run rspec for all rails versions
|
109
|
+
$ appraisal rspec
|
72
110
|
```
|
73
111
|
|
74
|
-
|
75
|
-
jquery plugin `railsSortable` is just a wrapper `jquery.ui.sortable`. therefore it accepts all of `sortbale` options.
|
112
|
+
# Licence
|
76
113
|
|
77
|
-
|
114
|
+
MIT Licence.
|
@@ -1,9 +1,7 @@
|
|
1
1
|
module SortableHelper
|
2
|
-
|
3
2
|
def sortable_fetch(models, &block)
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
end
|
3
|
+
warn "[DEPRECATION] `sortable_fetch` is deprecated. Please use Enumerable#each_with_sortable_id instead."
|
4
|
+
raise "Must be called with block!" unless block_given?
|
5
|
+
models.each_with_sortable_id(&block)
|
8
6
|
end
|
9
|
-
end
|
7
|
+
end
|
@@ -6,7 +6,7 @@ module RailsSortable
|
|
6
6
|
# ex)
|
7
7
|
# class SampleModel < ActiveRecord::Base
|
8
8
|
# include RailsSortable::Model
|
9
|
-
# set_sortable :sort,
|
9
|
+
# set_sortable :sort, without_updating_timestamps: true
|
10
10
|
# end
|
11
11
|
#
|
12
12
|
module Model
|
@@ -20,7 +20,10 @@ module RailsSortable
|
|
20
20
|
def update_sort!(new_value)
|
21
21
|
write_attribute sort_attribute, new_value
|
22
22
|
if self.class.sortable_options[:silence_recording_timestamps]
|
23
|
-
silence_recording_timestamps
|
23
|
+
warn "[DEPRECATION] `silence_recording_timestamps` is deprecated. Please use `without_updating_timestamps` instead."
|
24
|
+
without_updating_timestamps { save! }
|
25
|
+
elsif self.class.sortable_options[:without_updating_timestamps]
|
26
|
+
without_updating_timestamps { save! }
|
24
27
|
else
|
25
28
|
save!
|
26
29
|
end
|
@@ -33,7 +36,7 @@ module RailsSortable
|
|
33
36
|
write_attribute sort_attribute, max_sort
|
34
37
|
end
|
35
38
|
|
36
|
-
def
|
39
|
+
def without_updating_timestamps
|
37
40
|
raise ArgumentError unless block_given?
|
38
41
|
original_record_timestamps = self.class.record_timestamps
|
39
42
|
self.class.record_timestamps = false
|
@@ -52,8 +55,8 @@ module RailsSortable
|
|
52
55
|
module ClassMethods
|
53
56
|
#
|
54
57
|
# allowed options
|
55
|
-
# -
|
56
|
-
# When it is true, timestamp(updated_at) will be NOT
|
58
|
+
# - without_updating_timestamps
|
59
|
+
# When it is true, timestamp(updated_at) will be NOT touched on reordering.
|
57
60
|
#
|
58
61
|
def set_sortable(attribute, options = {})
|
59
62
|
self.define_singleton_method(:sort_attribute) { attribute }
|
data/lib/rails_sortable.rb
CHANGED
@@ -13,8 +13,8 @@
|
|
13
13
|
</thead>
|
14
14
|
|
15
15
|
<tbody class="sortable">
|
16
|
-
<%
|
17
|
-
<tr id="<%=
|
16
|
+
<% @items.each_with_sortable_id do |item, sortable_id| %>
|
17
|
+
<tr id="<%= sortable_id %>">
|
18
18
|
<td><%= item.title %></td>
|
19
19
|
<td><%= item.sort %></td>
|
20
20
|
<td><%= item.updated_at %></td>
|
@@ -13,8 +13,8 @@
|
|
13
13
|
</thead>
|
14
14
|
|
15
15
|
<tbody class="sortable">
|
16
|
-
<%
|
17
|
-
<tr id="<%=
|
16
|
+
<% @sequenced_items.each_with_sortable_id do |sequenced_item, sortable_id| %>
|
17
|
+
<tr id="<%= sortable_id %>">
|
18
18
|
<td><%= sequenced_item.title %></td>
|
19
19
|
<td><%= sequenced_item.sequence %></td>
|
20
20
|
<td><%= sequenced_item.updated_at %></td>
|
@@ -24,5 +24,7 @@ module Dummy
|
|
24
24
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
25
25
|
# config.i18n.default_locale = :de
|
26
26
|
end
|
27
|
+
|
28
|
+
MigrationClass = Gem::Version.new(Rails.version) < Gem::Version.new(5) ? ActiveRecord::Migration : ActiveRecord::Migration[4.2]
|
27
29
|
end
|
28
30
|
|
Binary file
|
data/spec/dummy/db/schema.rb
CHANGED
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|