songtianlun
50321533f7
- Removed unnecessary leading and trailing blank lines in several ActiveAdmin register files. - Reformatted string delimiters for consistency, changing single quotes to double quotes in tracking events in the Cities and WeatherArts controllers. - Ensured proper spacing in array definitions across several models, including Ahoy::Event and Ahoy::Visit. These changes improve code readability and maintain consistency throughout the codebase by ensuring uniform use of quotes and removing excess whitespace.
36 lines
1.3 KiB
Ruby
36 lines
1.3 KiB
Ruby
ActiveAdmin.register Ahoy::Visit do
|
|
# See permitted parameters documentation:
|
|
# https://github.com/activeadmin/activeadmin/blob/master/docs/2-resource-customization.md#setting-up-strong-parameters
|
|
#
|
|
# Uncomment all parameters which should be permitted for assignment
|
|
#
|
|
# permit_params :visit_token, :visitor_token, :user_id, :ip, :user_agent, :referrer, :referring_domain, :landing_page, :browser, :os, :device_type, :country, :region, :city, :latitude, :longitude, :utm_source, :utm_medium, :utm_term, :utm_content, :utm_campaign, :app_version, :os_version, :platform, :started_at
|
|
#
|
|
# or
|
|
#
|
|
# permit_params do
|
|
# permitted = [:visit_token, :visitor_token, :user_id, :ip, :user_agent, :referrer, :referring_domain, :landing_page, :browser, :os, :device_type, :country, :region, :city, :latitude, :longitude, :utm_source, :utm_medium, :utm_term, :utm_content, :utm_campaign, :app_version, :os_version, :platform, :started_at]
|
|
# permitted << :other if params[:action] == 'create' && current_user.admin?
|
|
# permitted
|
|
# end
|
|
|
|
menu priority: 100, label: "访问统计"
|
|
|
|
actions :index
|
|
|
|
index do
|
|
column :id
|
|
column :visitor_token
|
|
column :ip
|
|
column :user_agent
|
|
column :started_at
|
|
column :city
|
|
column :country
|
|
column :region
|
|
end
|
|
|
|
filter :started_at
|
|
filter :city
|
|
filter :country
|
|
end
|