effective_reports 0.2.4 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/mailers/effective/reports_mailer.rb +1 -1
- data/app/models/concerns/acts_as_reportable.rb +5 -1
- data/app/models/effective/report.rb +1 -1
- data/app/models/effective/report_column.rb +1 -1
- data/app/models/effective/report_scope.rb +1 -1
- data/config/effective_reports.rb +1 -7
- data/db/migrate/{01_create_effective_reports.rb.erb → 101_create_effective_reports.rb} +3 -3
- data/lib/effective_reports/version.rb +1 -1
- data/lib/effective_reports.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc5e577b9e0f7dbcd5425889023bc698c029deda52104a0a36e9ab3c5eb4a353
|
4
|
+
data.tar.gz: 01ebdb1ecff80758de3a495dee72919e514ded99b4c831e1995ab1f6ca7b28d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fed92ce6f5d9c049fae81dea487c1f061c4b05aed86202042fcbd5f4eb01de6b2bb2662d89b73fb9917fc79e188e500e3ab76be94e5c845f5005cad77734e6ff
|
7
|
+
data.tar.gz: 7b90bca9c8cc801a7cdf5cb4e25603e94ee313a8a6ae607e30fedbe0c95dfc134f832af88467b2c7b3bbf348c1cad62370f789d98d014d9945a025bef9e66a8e
|
@@ -2,7 +2,7 @@ module Effective
|
|
2
2
|
class ReportsMailer < EffectiveReports.parent_mailer_class
|
3
3
|
|
4
4
|
include EffectiveMailer
|
5
|
-
include EffectiveEmailTemplatesMailer
|
5
|
+
#include EffectiveEmailTemplatesMailer
|
6
6
|
|
7
7
|
# def reports_submitted(resource, opts = {})
|
8
8
|
# @assigns = assigns_for(resource)
|
@@ -35,7 +35,11 @@ module ActsAsReportable
|
|
35
35
|
end
|
36
36
|
|
37
37
|
# Used for the notifications mailer
|
38
|
-
|
38
|
+
# This should be a view_context that you can call urls on
|
39
|
+
# But it's a bit weird and sometimes it's just nil (like on an update action in the validation)
|
40
|
+
# Be careful when you code stuff for it
|
41
|
+
# Always return all the keys, and leave the value blank if view is blank
|
42
|
+
def reportable_view_assigns(view = nil)
|
39
43
|
{}
|
40
44
|
end
|
41
45
|
|
data/config/effective_reports.rb
CHANGED
@@ -1,8 +1,4 @@
|
|
1
1
|
EffectiveReports.setup do |config|
|
2
|
-
config.reports_table_name = :reports
|
3
|
-
config.report_columns_table_name = :report_columns
|
4
|
-
config.report_scopes_table_name = :report_scopes
|
5
|
-
|
6
2
|
# Layout Settings
|
7
3
|
# Configure the Layout per controller, or all at once
|
8
4
|
# config.layout = { application: 'application', admin: 'admin' }
|
@@ -29,9 +25,7 @@ EffectiveReports.setup do |config|
|
|
29
25
|
# config.deliver_method = nil # The deliver method, deliver_later or deliver_now
|
30
26
|
# config.mailer_layout = nil # Default mailer layout
|
31
27
|
# config.mailer_sender = nil # Default From value
|
28
|
+
# config.mailer_froms = nil # Default Froms collection
|
32
29
|
# config.mailer_admin = nil # Default To value for Admin correspondence
|
33
30
|
# config.mailer_subject = nil # Proc.new method used to customize Subject
|
34
|
-
|
35
|
-
# Will work with effective_email_templates gem
|
36
|
-
config.use_effective_email_templates = true
|
37
31
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class CreateEffectiveReports < ActiveRecord::Migration[6.0]
|
2
2
|
def change
|
3
|
-
create_table
|
3
|
+
create_table :reports do |t|
|
4
4
|
t.integer :created_by_id
|
5
5
|
t.string :created_by_type
|
6
6
|
|
@@ -12,7 +12,7 @@ class CreateEffectiveReports < ActiveRecord::Migration[6.0]
|
|
12
12
|
t.timestamps
|
13
13
|
end
|
14
14
|
|
15
|
-
create_table
|
15
|
+
create_table :report_columns do |t|
|
16
16
|
t.integer :report_id
|
17
17
|
|
18
18
|
t.string :name
|
@@ -34,7 +34,7 @@ class CreateEffectiveReports < ActiveRecord::Migration[6.0]
|
|
34
34
|
t.timestamps
|
35
35
|
end
|
36
36
|
|
37
|
-
create_table
|
37
|
+
create_table :report_scopes do |t|
|
38
38
|
t.integer :report_id
|
39
39
|
|
40
40
|
t.string :name
|
data/lib/effective_reports.rb
CHANGED
@@ -14,7 +14,7 @@ module EffectiveReports
|
|
14
14
|
|
15
15
|
# Effective Gem
|
16
16
|
:layout,
|
17
|
-
:mailer, :parent_mailer, :deliver_method, :mailer_layout, :mailer_sender, :
|
17
|
+
:mailer, :parent_mailer, :deliver_method, :mailer_layout, :mailer_sender, :mailer_froms, :mailer_admin, :mailer_subject
|
18
18
|
]
|
19
19
|
end
|
20
20
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_reports
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -194,7 +194,7 @@ files:
|
|
194
194
|
- app/views/admin/reports/_report.html.haml
|
195
195
|
- config/effective_reports.rb
|
196
196
|
- config/routes.rb
|
197
|
-
- db/migrate/
|
197
|
+
- db/migrate/101_create_effective_reports.rb
|
198
198
|
- db/seeds.rb
|
199
199
|
- lib/effective_reports.rb
|
200
200
|
- lib/effective_reports/engine.rb
|