Frederic Merizen
02f35e655d
[ #3477 ] Minor simplification
2019-03-11 17:14:17 +01:00
Frederic Merizen
b4790e5009
[ #3477 ] Slightly more compact
2019-03-11 17:14:17 +01:00
Frederic Merizen
e8747f7c38
[ #3477 ] Extract helper method
2019-03-11 17:14:17 +01:00
Frederic Merizen
656f0df377
[ #3477 ] Remove clunky extra method
2019-03-11 17:14:17 +01:00
Frederic Merizen
f64ade355f
[ #3477 ] Fix a copy-paste mistake
2019-03-11 17:14:17 +01:00
Frederic Merizen
7d09624bbe
[ #3477 ] We only use the table anyway
2019-03-11 17:14:17 +01:00
Frederic Merizen
c9ad2995f1
[ #3477 ] Remove extraneous variable
2019-03-11 17:14:17 +01:00
Frederic Merizen
4646e10864
[ #3477 ] The where clause doesn't do what it's supposed to do
2019-03-11 17:14:17 +01:00
Frederic Merizen
cf3f2409dd
[ #3477 ] Clarify what the previous code of eager_load_displayed_fields does
2019-03-11 17:14:17 +01:00
Frederic Merizen
f0d83b1de8
[ #3477 ] ignore invalid dates for now
2019-03-11 17:14:17 +01:00
Frederic Merizen
0ba3515d41
[ #3477 ] Filter by 'column ilike values' as a scope
2019-03-11 17:14:17 +01:00
Frederic Merizen
a87e3ac697
[ #3477 ] Make filtering by datetimes a proper scope
2019-03-11 17:14:17 +01:00
Frederic Merizen
9096f923b1
[ #3477 ] Cleaner way to return no dossiers
2019-03-11 17:14:17 +01:00
Frederic Merizen
d24fb5d186
[ #3477 ] Let where_ilike take care of necessary sanitizing
2019-03-11 17:14:17 +01:00
Frederic Merizen
e098779c5e
[ #3477 ] Accept symbol arguments to sanitized_column
2019-03-11 17:14:17 +01:00
Frederic Merizen
f34e65c207
[ #3477 ] Make sanitized_column a class method
2019-03-11 17:14:17 +01:00
Frederic Merizen
7241e43a7c
[ #3477 ] Allow calling sanitized_column with individual fields
...
rather than a hash
2019-03-11 17:14:17 +01:00
Frederic Merizen
00ca2e0cbb
[ #3477 ] Make sanitized_column dryer
2019-03-11 17:14:17 +01:00
Frederic Merizen
1f34d971d1
[ #3477 ] where_equals is trivial, inline it
2019-03-11 17:14:17 +01:00
Frederic Merizen
91e6671cfb
[ #3477 ] Do not use string interpolation for where_equals
2019-03-11 17:14:17 +01:00
Frederic Merizen
3c96c2e83d
[ #3477 ] Do not use string interpolation for where_datetime_matches
2019-03-11 17:14:17 +01:00
Frederic Merizen
664956d8c6
[ #3477 ] Move compact nearer to the nil-generating place
2019-03-11 17:14:17 +01:00
Frederic Merizen
55d4dcc174
[ #3477 ] Introduce column variable
2019-03-11 17:14:17 +01:00
Frederic Merizen
35d5322a9b
[ #3477 ] Clarify variable name
2019-03-11 17:14:17 +01:00
Frederic Merizen
cf2b40f6a0
[ #3477 ] Extract all variables from sort hash
2019-03-11 17:14:17 +01:00
Frederic Merizen
21128d94b6
[ #3477 ] Inline only use of variable
2019-03-11 17:14:17 +01:00
Frederic Merizen
43243e73d4
[ #3477 ] Merge two ordering cases
2019-03-11 17:14:17 +01:00
Frederic Merizen
71f766c434
[ #3477 ] Prefer pluck over map
2019-03-11 17:14:17 +01:00
Frederic Merizen
c53370e14c
[ #3477 ] Reuse existing filtering facility
2019-03-11 17:14:17 +01:00
Frederic Merizen
393f1b1971
[ #3477 ] Move eager_load_displayed_fields to model
2019-03-11 17:14:17 +01:00
Frederic Merizen
70bf6aecf6
[ #3477 ] Filter by mutliple values
2019-03-11 17:14:17 +01:00
Frederic Merizen
1431de5cc2
[ #3477 ] Handle multiply-valued filters
2019-03-11 17:14:17 +01:00
Frederic Merizen
54cb65b8a7
[ #3477 ] Extract helper
2019-03-11 17:14:17 +01:00
Frederic Merizen
c75983710c
Force stable order on champ fields
2019-03-11 11:32:17 +01:00
Mathieu Magnin
fed1f3e921
Use query filter instead of array.reject
2019-02-26 12:05:49 +01:00
gregoirenovel
186e362701
Enable the Layout/SpaceInsideArrayLiteralBrackets
2019-01-03 10:53:50 +01:00
gregoirenovel
386fbce776
Enable the Layout/SpaceBeforeBlockBraces cop
2019-01-03 10:53:50 +01:00
Frederic Merizen
f6207bee26
Do not take time of day into account when searching dates
2018-10-26 17:53:26 +02:00
simon lehericey
a06f872a4b
ProcedurePresentation: rescue big int as a datetime value
2018-10-26 14:39:17 +02:00
simon lehericey
63db387984
ProcedurePresentation: display dossier date in d/m/Y
2018-10-26 10:10:20 +00:00
simon lehericey
3685c65fb7
[ fix #2905 ] fix DATE_TRUNC usage
...
DATE_TRUNC is played on the db where the timestamp are stored in utc.
So if a user search for 12/12/2012 in Paris timezone and that we truncate it should do something similar to :
SELECT DATE_TRUNC('day', foo.timezone) from (SELECT timestamp '2012-12-12 00:00:00' AT TIME ZONE 'Europe/Paris') as foo;
=> 2012-12-11
To avoid such pb, I suggest avoiding DATE_TRUNC when exact results are needed
2018-10-26 10:10:20 +00:00
Frederic Merizen
64cb231b01
[ #2675 ] Fix notification sort order
2018-10-24 17:10:30 +02:00
Frederic Merizen
a2bd0582b9
[ Fix #2741 ] Filter / sort by en_construction_at
2018-10-17 12:16:51 +02:00
Frederic Merizen
3dca3c7dee
[ Fix #1961 ] Check that sorted_ids works for individual
2018-10-11 12:13:03 +02:00
Frederic Merizen
abd066c6f4
[ #1961 ] filtered_ids for individual
2018-10-11 12:13:03 +02:00
Frederic Merizen
34da620b0f
[ #1961 ] get_value for individual
2018-10-11 12:13:03 +02:00
Frederic Merizen
5d862ae92b
[ #1961 ] Add individual fields
2018-10-11 12:13:03 +02:00
Frederic Merizen
07b8838561
Remove dead code
...
Should have been removed as part of #2720 but was accidentally reintroduced
in #2770
2018-10-11 12:00:49 +02:00
Frederic Merizen
577475f26e
[ Fix #2580 ] Filter by created_at / updated_at
2018-10-10 18:18:28 +02:00
Frederic Merizen
fac6922b98
[ #2750 ] Set might be overkill here
2018-10-10 09:07:57 +02:00