added dashboard
This commit is contained in:
parent
f5670847f6
commit
02c3d5c4ce
|
|
@ -0,0 +1,47 @@
|
||||||
|
class DashboardController < ApplicationController
|
||||||
|
def index
|
||||||
|
@monitor = []
|
||||||
|
general_data
|
||||||
|
visits_data
|
||||||
|
pdfs_data
|
||||||
|
search_data
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def general_data
|
||||||
|
@monitor << [
|
||||||
|
Dotation.all.size,
|
||||||
|
Dotation.public_dot.size,
|
||||||
|
FilterForEmail.all.size,
|
||||||
|
EmailMessage.all.size
|
||||||
|
]
|
||||||
|
end
|
||||||
|
|
||||||
|
def visits_data
|
||||||
|
@monitor << [
|
||||||
|
VisitHistory.visits.count,
|
||||||
|
VisitHistory.visits.by_today.size,
|
||||||
|
VisitHistory.visits.by_7days.size,
|
||||||
|
VisitHistory.visits.by_30days.size
|
||||||
|
]
|
||||||
|
end
|
||||||
|
|
||||||
|
def pdfs_data
|
||||||
|
@monitor << [
|
||||||
|
VisitHistory.pdf_files.count,
|
||||||
|
VisitHistory.pdf_files.by_today.size,
|
||||||
|
VisitHistory.pdf_files.by_7days.size,
|
||||||
|
VisitHistory.pdf_files.by_30days.size
|
||||||
|
]
|
||||||
|
end
|
||||||
|
|
||||||
|
def search_data
|
||||||
|
@monitor << [
|
||||||
|
VisitHistory.search.count,
|
||||||
|
VisitHistory.search.by_today.size,
|
||||||
|
VisitHistory.search.by_7days.size,
|
||||||
|
VisitHistory.search.by_30days.size
|
||||||
|
]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -14,6 +14,8 @@ class HomeController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
VisitHistory.create(ip_address: request.remote_ip, event: 0, site: 0)
|
||||||
|
puts request.remote_ip
|
||||||
require 'json'
|
require 'json'
|
||||||
prepare_filters
|
prepare_filters
|
||||||
cookies[:filter] = JSON.generate(build_filter_hash)
|
cookies[:filter] = JSON.generate(build_filter_hash)
|
||||||
|
|
@ -25,6 +27,7 @@ class HomeController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def search
|
def search
|
||||||
|
VisitHistory.create(ip_address: request.remote_ip, event: 1)
|
||||||
require 'json'
|
require 'json'
|
||||||
prepare_filters
|
prepare_filters
|
||||||
cookies[:filter] = JSON.generate(build_filter_hash)
|
cookies[:filter] = JSON.generate(build_filter_hash)
|
||||||
|
|
@ -36,10 +39,12 @@ class HomeController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def contact
|
def contact
|
||||||
|
VisitHistory.create(ip_address: request.remote_ip, event: 0, site: 1)
|
||||||
@email_message = EmailMessage.new
|
@email_message = EmailMessage.new
|
||||||
end
|
end
|
||||||
|
|
||||||
def statute
|
def statute
|
||||||
|
VisitHistory.create(ip_address: request.remote_ip, event: 0, site: 2)
|
||||||
@setting = Setting.first
|
@setting = Setting.first
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -64,9 +69,12 @@ class HomeController < ApplicationController
|
||||||
SendContactEmailJob.perform_later(@consultation_email.id)
|
SendContactEmailJob.perform_later(@consultation_email.id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def arrange_consultation; end
|
def arrange_consultation
|
||||||
|
VisitHistory.create(ip_address: request.remote_ip, event: 0, site: 3)
|
||||||
|
end
|
||||||
|
|
||||||
def monitor
|
def monitor
|
||||||
|
VisitHistory.create(ip_address: request.remote_ip, event: 0, site: 4)
|
||||||
prepare_filters
|
prepare_filters
|
||||||
cookies[:filter] = JSON.generate(build_filter_hash)
|
cookies[:filter] = JSON.generate(build_filter_hash)
|
||||||
end
|
end
|
||||||
|
|
@ -77,8 +85,13 @@ class HomeController < ApplicationController
|
||||||
.where.not(id: @dotation.id).limit(4)
|
.where.not(id: @dotation.id).limit(4)
|
||||||
@company_sizes = CompanySize.all
|
@company_sizes = CompanySize.all
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html do
|
||||||
|
VisitHistory.create(ip_address: request.remote_ip, event: 0, site: 5,
|
||||||
|
dotation_id: @dotation.id)
|
||||||
|
end
|
||||||
format.pdf do
|
format.pdf do
|
||||||
|
VisitHistory.create(ip_address: request.remote_ip, event: 2, site: 5,
|
||||||
|
dotation_id: @dotation.id)
|
||||||
pdf1a = WickedPdf.new.pdf_from_string(
|
pdf1a = WickedPdf.new.pdf_from_string(
|
||||||
render_cover_header(@dotation, @company_sizes),
|
render_cover_header(@dotation, @company_sizes),
|
||||||
{pdf: 'cover_header',
|
{pdf: 'cover_header',
|
||||||
|
|
@ -136,6 +149,7 @@ class HomeController < ApplicationController
|
||||||
@dotations = Dotation.search_with_filters(filters).public_dot
|
@dotations = Dotation.search_with_filters(filters).public_dot
|
||||||
.point_desc.end_date_asc
|
.point_desc.end_date_asc
|
||||||
dotation = @dotations.first
|
dotation = @dotations.first
|
||||||
|
VisitHistory.create(ip_address: request.remote_ip, event: 2, site: 0)
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.pdf do
|
format.pdf do
|
||||||
pdf1a = WickedPdf.new.pdf_from_string(
|
pdf1a = WickedPdf.new.pdf_from_string(
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ module ApplicationHelper
|
||||||
# icon, name, controller,
|
# icon, name, controller,
|
||||||
def nav_menu
|
def nav_menu
|
||||||
ret = ''
|
ret = ''
|
||||||
|
ret += menu_item('fas fa-tachometer-alt', 'Statystyki', '/dashboard', 'dashboard') if admin?
|
||||||
ret += menu_item('far fa-circle', 'Dotacje', '/grants', 'grants') if role?('dotations')
|
ret += menu_item('far fa-circle', 'Dotacje', '/grants', 'grants') if role?('dotations')
|
||||||
ret += menu_item('far fa-circle', 'Wydatki', '/expenses', 'expenses') if role?('expenses')
|
ret += menu_item('far fa-circle', 'Wydatki', '/expenses', 'expenses') if role?('expenses')
|
||||||
ret += menu_item('far fa-circle', 'Wielkość firmy', '/company_sizes', 'company_sizes') if role?('company_sizes')
|
ret += menu_item('far fa-circle', 'Wielkość firmy', '/company_sizes', 'company_sizes') if role?('company_sizes')
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
module DashboardHelper
|
||||||
|
end
|
||||||
|
|
@ -13,7 +13,7 @@ class Expert < ApplicationRecord
|
||||||
|
|
||||||
# == Validations ==========================================================
|
# == Validations ==========================================================
|
||||||
validates :name, presence: true
|
validates :name, presence: true
|
||||||
|
validates :description, presence: true, length: { maximum: 500 }
|
||||||
# == Scopes ===============================================================
|
# == Scopes ===============================================================
|
||||||
|
|
||||||
# == Callbacks ============================================================
|
# == Callbacks ============================================================
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
# event
|
||||||
|
# 0 - vist
|
||||||
|
# 1 - search
|
||||||
|
# 2 - pdf generation
|
||||||
|
|
||||||
|
# site
|
||||||
|
# 0 - index
|
||||||
|
# 1 - contact
|
||||||
|
# 2 - regulamin
|
||||||
|
# 3 - umow_konsultacje
|
||||||
|
# 4 - monitoring
|
||||||
|
# 5 - dotacja
|
||||||
|
|
||||||
|
# History model
|
||||||
|
class VisitHistory < ApplicationRecord
|
||||||
|
# == Constants ============================================================
|
||||||
|
|
||||||
|
# == Attributes ===========================================================
|
||||||
|
|
||||||
|
# == Extensions ===========================================================
|
||||||
|
|
||||||
|
# == Relationships ========================================================
|
||||||
|
|
||||||
|
# == Validations ==========================================================
|
||||||
|
|
||||||
|
# == Scopes ===============================================================
|
||||||
|
scope :visits, -> { where(event: 0) }
|
||||||
|
scope :search, -> { where(event: 1) }
|
||||||
|
scope :pdf_files, -> { where(event: 2) }
|
||||||
|
scope :by_today, -> { where('created_at > ?', Time.now.midnight) }
|
||||||
|
scope :by_7days, -> { where('created_at > ?', Time.now.midnight - 7.days) }
|
||||||
|
scope :by_30days, -> { where('created_at > ?', Time.now.midnight - 30.days) }
|
||||||
|
scope :dist_ip, -> { select(:ip_address).uniq }
|
||||||
|
# == Callbacks ============================================================
|
||||||
|
|
||||||
|
# == Class Methods ========================================================
|
||||||
|
|
||||||
|
# == Instance Methods =====================================================
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1,266 @@
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
<div class="content-header">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<h1 class="m-0">Statystyki</h1>
|
||||||
|
</div>
|
||||||
|
<!-- /.col -->
|
||||||
|
<div class="col-sm-6"></div>
|
||||||
|
<!-- /.col -->
|
||||||
|
</div>
|
||||||
|
<!-- /.row -->
|
||||||
|
</div>
|
||||||
|
<!-- /.container-fluid -->
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<h5 class="mb-2">Ogólne dane</h5>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-3 col-6">
|
||||||
|
|
||||||
|
<div class="small-box bg-info">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><%= @monitor[0][0] %></h3>
|
||||||
|
<p>Dotacji w bazie</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="fas fa-database"></i>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<a href="#" class="small-box-footer"> </a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-3 col-6">
|
||||||
|
|
||||||
|
<div class="small-box bg-success">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><%= @monitor[0][1] %></h3>
|
||||||
|
<p>Aktywnych dotacji</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="fas fa-server"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#" class="small-box-footer"> </a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-3 col-6">
|
||||||
|
|
||||||
|
<div class="small-box bg-warning">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><%= @monitor[0][2] %></h3>
|
||||||
|
<p>Zapisane filtry</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="fas fa-filter"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#" class="small-box-footer"> </a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-3 col-6">
|
||||||
|
|
||||||
|
<div class="small-box bg-danger">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><%= @monitor[0][3] %></h3>
|
||||||
|
<p>Kontakty od klientów</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="fas fa-envelope"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#" class="small-box-footer"> </a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
<h5 class="mb-2">Wizyty na stronie</h5>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-3 col-6">
|
||||||
|
|
||||||
|
<div class="small-box bg-warning">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><%= @monitor[1][0] %></h3>
|
||||||
|
<p>Wszystkie wizyty</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="fas fa-user-plus"></i>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<a href="#" class="small-box-footer"> </a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-3 col-6">
|
||||||
|
|
||||||
|
<div class="small-box bg-light">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><%= @monitor[1][1] %></h3>
|
||||||
|
<p>Wizyty - dzisiaj</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="fas fa-user-plus"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#" class="small-box-footer"> </a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-3 col-6">
|
||||||
|
|
||||||
|
<div class="small-box bg-secondary">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><%= @monitor[1][2] %></h3>
|
||||||
|
<p>Wizyty - 7 dni</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="fas fa-user-plus"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#" class="small-box-footer"> </a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-lg-3 col-6">
|
||||||
|
|
||||||
|
<div class="small-box bg-dark">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><%= @monitor[1][3] %></h3>
|
||||||
|
<p>Wizyty - 30 dni</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="fas fa-user-plus"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#" class="small-box-footer"> </a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
<h5 class="mb-2">Wygenerowane pliki PDF</h5>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-3 col-6">
|
||||||
|
|
||||||
|
<div class="small-box bg-primary">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><%= @monitor[2][0] %></h3>
|
||||||
|
<p>Pobrane pliki</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="fas fa-download"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#" class="small-box-footer"> </a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-3 col-6">
|
||||||
|
|
||||||
|
<div class="small-box bg-light">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><%= @monitor[2][1] %></h3>
|
||||||
|
<p>Pobrane pliki - dzisiaj</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="fas fa-download"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#" class="small-box-footer"> </a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-3 col-6">
|
||||||
|
|
||||||
|
<div class="small-box bg-secondary">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><%= @monitor[2][2] %></h3>
|
||||||
|
<p>Pobrane pliki - 7 dni</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="fas fa-download"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#" class="small-box-footer"> </a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-lg-3 col-6">
|
||||||
|
|
||||||
|
<div class="small-box bg-dark">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><%= @monitor[2][3] %></h3>
|
||||||
|
<p>Pobrane pliki - 30 dni</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="fas fa-download"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#" class="small-box-footer"> </a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
<h5 class="mb-2">Wyszukiwanie</h5>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-3 col-6">
|
||||||
|
|
||||||
|
<div class="small-box bg-success">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><%= @monitor[3][0] %></h3>
|
||||||
|
<p>Wszystkie wyszukania</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="fas fa-search"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#" class="small-box-footer"> </a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-3 col-6">
|
||||||
|
|
||||||
|
<div class="small-box bg-light">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><%= @monitor[3][1] %></h3>
|
||||||
|
<p>Wyszukiwanie - dzisiaj</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="fas fa-search"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#" class="small-box-footer"> </a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-3 col-6">
|
||||||
|
|
||||||
|
<div class="small-box bg-secondary">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><%= @monitor[3][2] %></h3>
|
||||||
|
<p>Wyszukiwanie - 7 dni</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="fas fa-search"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#" class="small-box-footer"> </a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-lg-3 col-6">
|
||||||
|
|
||||||
|
<div class="small-box bg-dark">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><%= @monitor[3][3] %></h3>
|
||||||
|
<p>Wyszukiwanie - 30 dni</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="fas fa-search"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#" class="small-box-footer"> </a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
class CreateVisitHistories < ActiveRecord::Migration[5.2]
|
||||||
|
def change
|
||||||
|
create_table :visit_histories do |t|
|
||||||
|
t.string :ip_address
|
||||||
|
t.bigint :dotation_id
|
||||||
|
t.integer :event
|
||||||
|
t.integer :site
|
||||||
|
t.string :add_data
|
||||||
|
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
add_index :visit_histories, :event
|
||||||
|
add_index :visit_histories, :ip_address
|
||||||
|
add_index :visit_histories, :dotation_id
|
||||||
|
add_index :visit_histories, :site
|
||||||
|
end
|
||||||
|
end
|
||||||
16
db/schema.rb
16
db/schema.rb
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 2022_08_30_110315) do
|
ActiveRecord::Schema.define(version: 2022_09_30_202617) do
|
||||||
|
|
||||||
create_table "active_storage_attachments", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
|
create_table "active_storage_attachments", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
|
||||||
t.string "name", null: false
|
t.string "name", null: false
|
||||||
|
|
@ -308,5 +308,19 @@ ActiveRecord::Schema.define(version: 2022_08_30_110315) do
|
||||||
t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true
|
t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "visit_histories", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
|
||||||
|
t.string "ip_address"
|
||||||
|
t.bigint "dotation_id"
|
||||||
|
t.integer "event"
|
||||||
|
t.integer "site"
|
||||||
|
t.string "add_data"
|
||||||
|
t.datetime "created_at", null: false
|
||||||
|
t.datetime "updated_at", null: false
|
||||||
|
t.index ["dotation_id"], name: "index_visit_histories_on_dotation_id"
|
||||||
|
t.index ["event"], name: "index_visit_histories_on_event"
|
||||||
|
t.index ["ip_address"], name: "index_visit_histories_on_ip_address"
|
||||||
|
t.index ["site"], name: "index_visit_histories_on_site"
|
||||||
|
end
|
||||||
|
|
||||||
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
|
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
require 'test_helper'
|
||||||
|
|
||||||
|
class DashboardControllerTest < ActionDispatch::IntegrationTest
|
||||||
|
test "should get index" do
|
||||||
|
get dashboard_index_url
|
||||||
|
assert_response :success
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||||
|
|
||||||
|
one:
|
||||||
|
ip_address: MyString
|
||||||
|
dotation_id:
|
||||||
|
event: 1
|
||||||
|
add_data: MyString
|
||||||
|
|
||||||
|
two:
|
||||||
|
ip_address: MyString
|
||||||
|
dotation_id:
|
||||||
|
event: 1
|
||||||
|
add_data: MyString
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
require 'test_helper'
|
||||||
|
|
||||||
|
class VisitHistoryTest < ActiveSupport::TestCase
|
||||||
|
# test "the truth" do
|
||||||
|
# assert true
|
||||||
|
# end
|
||||||
|
end
|
||||||
Loading…
Reference in New Issue