best_boy 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -7,8 +7,8 @@ module BestBoy
|
|
7
7
|
|
8
8
|
layout 'best_boy_backend'
|
9
9
|
|
10
|
-
helper_method :available_owner_types, :available_events, :available_event_sources, :available_years, :current_owner_type,
|
11
|
-
:current_event, :current_event_source, :current_year, :collection, :statistics, :stats_by_event_and_month,
|
10
|
+
helper_method :available_owner_types, :available_events, :available_event_sources, :available_years, :current_owner_type,
|
11
|
+
:current_event, :current_event_source, :current_year, :collection, :statistics, :stats_by_event_and_month,
|
12
12
|
:stats_by_event_source_and_month, :render_chart, :event_source_details, :month_name_array, :detail_count,
|
13
13
|
:current_month, :stats_by_event_source_and_day
|
14
14
|
|
@@ -23,8 +23,8 @@ module BestBoy
|
|
23
23
|
time = "#{periode}-#{current_month}-#{current_year}".to_time
|
24
24
|
data_table.add_row( [ periode.to_s] + available_event_sources.map{ |source| custom_data_count(source, time)})
|
25
25
|
end
|
26
|
-
@chart = GoogleVisualr::Interactive::AreaChart.new(data_table, { width: 900, height: 240, title: "" })
|
27
|
-
end
|
26
|
+
@chart = GoogleVisualr::Interactive::AreaChart.new(data_table, { width: 900, height: 240, title: "" })
|
27
|
+
end
|
28
28
|
|
29
29
|
private
|
30
30
|
|
@@ -173,8 +173,8 @@ module BestBoy
|
|
173
173
|
end
|
174
174
|
|
175
175
|
def current_scope(options = {})
|
176
|
-
options.each do |key, value|
|
177
|
-
instance_var = "@#{key}"
|
176
|
+
options.each do |key, value|
|
177
|
+
instance_var = "@#{key}"
|
178
178
|
instance_variable_set(instance_var, value)
|
179
179
|
end
|
180
180
|
|
data/lib/best_boy.rb
CHANGED
@@ -2,9 +2,9 @@ require "best_boy/engine.rb"
|
|
2
2
|
|
3
3
|
module BestBoy
|
4
4
|
# Define ORM
|
5
|
-
mattr_accessor :precompile_assets, :orm, :base_controller, :before_filter,
|
5
|
+
mattr_accessor :precompile_assets, :orm, :base_controller, :before_filter,
|
6
6
|
:skip_before_filter, :custom_redirect
|
7
|
-
|
7
|
+
|
8
8
|
@@precompile_assets = false
|
9
9
|
@@orm = :active_record
|
10
10
|
@@base_controller = "ApplicationController"
|
data/lib/best_boy/engine.rb
CHANGED
@@ -3,8 +3,8 @@ require "rails"
|
|
3
3
|
require "google_visualr"
|
4
4
|
|
5
5
|
module BestBoy
|
6
|
-
class Engine < Rails::Engine
|
7
|
-
|
6
|
+
class Engine < ::Rails::Engine
|
7
|
+
|
8
8
|
initializer 'best_boy.assets', :group => :all do |app|
|
9
9
|
initializer_path = "#{Rails.root}/config/initializers/best_boy.rb"
|
10
10
|
require initializer_path if File.exist? initializer_path
|
@@ -22,7 +22,7 @@ module BestBoy
|
|
22
22
|
else
|
23
23
|
raise "Sorry, best_boy actually only supports ActiveRecord ORM."
|
24
24
|
end
|
25
|
-
|
25
|
+
|
26
26
|
end
|
27
27
|
|
28
28
|
initializer 'best_boy.controller' do
|
data/lib/best_boy/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
BestBoy.setup do |config|
|
2
2
|
# if you want to use the asset-pipeline, set precompile_assets to true (default: false)
|
3
3
|
# config.precompile_assets = true
|
4
|
-
|
4
|
+
|
5
5
|
# Define ORM. Could be :active_record (default). Actually no other mapper is supported
|
6
6
|
#config.orm = :active_record
|
7
7
|
|
@@ -12,8 +12,28 @@ BestBoy.setup do |config|
|
|
12
12
|
#config.before_filter = nil
|
13
13
|
|
14
14
|
# Define skip_before_filter for skipping before_filters (default = nil)
|
15
|
-
#config.skip_before_filter = nil
|
15
|
+
#config.skip_before_filter = nil
|
16
16
|
|
17
17
|
# Define custom redirect path as string p.e. "/admin" (default = nil)
|
18
18
|
#config.custom_redirect = nil
|
19
|
-
end
|
19
|
+
end
|
20
|
+
|
21
|
+
# if you are using will_paginate in your app project, you will need this uncommended
|
22
|
+
# this is a temporary fix that forces will_paginate to behave like kaminari
|
23
|
+
|
24
|
+
# module WillPaginate
|
25
|
+
# # make will paginate behave like kaminari
|
26
|
+
# module ActiveRecord
|
27
|
+
# module RelationMethods
|
28
|
+
# def per(value = nil)
|
29
|
+
# per_page(value)
|
30
|
+
# end
|
31
|
+
# end
|
32
|
+
# end
|
33
|
+
|
34
|
+
# module ActionView
|
35
|
+
# def paginate(collection = nil, options = {})
|
36
|
+
# will_paginate(collection, options)
|
37
|
+
# end
|
38
|
+
# end
|
39
|
+
# end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: best_boy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
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: 2013-05-
|
12
|
+
date: 2013-05-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: kaminari
|