carnival 0.2.5 → 0.2.6

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.
@@ -21,7 +21,7 @@ module Carnival
21
21
  if date_filter_field.present?
22
22
  query_form.date_period_label = date_filter_field.default_date_filter if query_form.date_period_label.nil?
23
23
  query_form.date_period_from = date_filter_field.date_filter_periods[query_form.date_period_label].first if query_form.date_period_from.nil?
24
- query_form.date_period_to = date_filter_field.date_filter_periods[query_form.date_period_label].first if query_form.date_period_to.nil?
24
+ query_form.date_period_to = date_filter_field.date_filter_periods[query_form.date_period_label].last if query_form.date_period_to.nil?
25
25
  end
26
26
 
27
27
  query_form
@@ -87,7 +87,7 @@ module Carnival
87
87
  end
88
88
 
89
89
  def includes_relations(records)
90
- if @should_include_relation and @presenter.join_tables.size > 0
90
+ if @should_include_relation and @presenter.join_tables.size > 0
91
91
  records.includes(*@presenter.join_tables)
92
92
  else
93
93
  records
@@ -8,10 +8,11 @@
8
8
  .search_field
9
9
  .label
10
10
  - label_field = presenter.get_field(field)
11
+ - default_label = t("activerecord.attributes.#{presenter.full_model_name}.#{key}")
11
12
  - if presenter.relation_field?(label_field)
12
- = label_tag key, t("activerecord.attributes.#{label_field.name}")
13
+ = label_tag key, t("activerecord.attributes.#{label_field.name}", default: default_label)
13
14
  - else
14
- = label_tag key, t("activerecord.attributes.#{presenter.full_model_name}.#{key}")
15
+ = label_tag key, default_label
15
16
  .field
16
17
  = render '/carnival/shared/advanced_search_field', :field => field, :presenter => presenter, :value => value
17
18
  %li.search_item
@@ -1,3 +1,3 @@
1
1
  module Carnival
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carnival
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-03-26 00:00:00.000000000 Z
12
+ date: 2015-03-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails