metric_admin 0.0.23 → 0.0.24

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: 563e709e3eed279359a2edcb0d5848c723bdd179
4
- data.tar.gz: 56906b5c54eef337958e036b568f8f1fcc9e8a2a
3
+ metadata.gz: f68c7616f3f2dc5bf976c9fc019416df385c48bc
4
+ data.tar.gz: a98d6e9957fd27814b0f32ad0341feb492616d8f
5
5
  SHA512:
6
- metadata.gz: d2c9fb4fc5944b789fe5f3d5801acc8d78e3221b973dc459d072b99b4e8a5d10c28069de747fc5391b2d272bb81d48702f0276393fdc7dc91b3bafcb9f6ed0ee
7
- data.tar.gz: 609e6b26e03fca3924d18c9fb80dd953dec5416466d64bd13c8542cd56b3a17acc12a7ff539a44e467e80f4c1562ffe750df95a94d6242bd9b14ea6b3cd1ae24
6
+ metadata.gz: 2f505cf785858e10e58957eed271540d29832ede2cd6c5e4811582d9ba80e8534c1aa851d3378ae47d9122f3b5f59adc7d409f2d556465f2875f10a028731509
7
+ data.tar.gz: ad53597fd5586ec5a762d68065b5f6236aa62a41e23af5464e88f05cfaa79015f82f67c20de242caab9b74258d289e2007f474ad537c0ba9f48233ad8e7171ea
data/README.md CHANGED
@@ -133,7 +133,7 @@ Link the metric_admin.js and the metric_admin.css in the admin view in ```layout
133
133
 
134
134
  Also ensure that you have linked in the admin layout the lastest jquery.ui.min.js file.
135
135
 
136
- Ensure that the metric table has a public_sort column.
136
+ Ensure that the metric table has a sort column.
137
137
 
138
138
  In the dashboard application modify ```app/models/metric.rb```
139
139
 
@@ -54,7 +54,7 @@ module MetricAdmin
54
54
  def sort
55
55
  params[:metric].each_with_index do |metric_id, i|
56
56
  @metric = Metric.find(metric_id)
57
- @metric.update_attribute(:public_sort, i)
57
+ @metric.update_attribute(:sort, i)
58
58
  end
59
59
  render :text => "sorted"
60
60
  end
@@ -63,7 +63,7 @@ module MetricAdmin
63
63
  @metric_to_clone = Metric.find(params[:id])
64
64
  @metric = @metric_to_clone.clone
65
65
  @metric.title = "Copy of #{@metric.title}"
66
- @metric.public_sort = Metric.maximum(:public_sort, :conditions=>["resource_type_id = ?", @metric_to_clone.resource_type_id ]).to_i + 1
66
+ @metric.sort = Metric.maximum(:sort, :conditions=>["resource_type_id = ?", @metric_to_clone.resource_type_id ]).to_i + 1
67
67
  if @metric.save
68
68
  flash[:notice] = "#{@metric.title} has been cloned"
69
69
  redirect_to edit_admin_metric_url(@metric)
@@ -39,7 +39,7 @@
39
39
  .control-group
40
40
  %label.control-label{:for => "title"} Sort order
41
41
  .controls
42
- = f.text_field :sort, :value => @metric.public_sort.nil? ? @metric.resource_type.metrics.count : @metric.public_sort, :disabled => true, :class=>"span3"
42
+ = f.text_field :sort, :value => @metric.sort.nil? ? @metric.resource_type.metrics.count : @metric.sort, :disabled => true, :class=>"span3"
43
43
 
44
44
  .span6
45
45
  .row
@@ -18,7 +18,7 @@
18
18
  %h2.page-subtitle.pull-left= c.name
19
19
  = link_to "<i class='icon-plus icon-white'></i> Create a new #{c.name} metric", new_admin_metric_url(:resource_type_id => c), :class=>"btn btn-primary pull-right"
20
20
 
21
- - metrics = Metric.all(:conditions=>["resource_type_id=?", c.id], :order => 'category ASC, public_sort ASC')
21
+ - metrics = Metric.all(:conditions=>["resource_type_id=?", c.id], :order => 'category ASC, sort ASC')
22
22
 
23
23
  - if metrics
24
24
  - metrics.group_by{|x| x.category }.each do |category, _metrics|
@@ -1,3 +1,3 @@
1
1
  module MetricAdmin
2
- VERSION = "0.0.23"
2
+ VERSION = "0.0.24"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metric_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.23
4
+ version: 0.0.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Analytics For Lawyers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-02 00:00:00.000000000 Z
11
+ date: 2017-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler