uninitialized constant WillPaginate::ActionView
Extracted source (around line #153):
151
152
153
154
155
156
|
end
class EventsLinkRenderer < WillPaginate::ActionView::LinkRenderer
def page_number(page)
if page == current_page
tag :span, page, class: 'current events_pagination_item active'
|
Extracted source (around line #1):
1
2
3
4
5
6
|
module ApplicationHelper
def error_message(field_name, errors_list)
if errors_list && errors_list[field_name]
if field_name == 'picture.image'
@errors = [errors_list[field_name].first.capitalize]
|
Extracted source (around line #30):
28
29
30
31
32
33
|
else
# Note that require registers to $LOADED_FEATURES while load does not.
ret = require_without_bootsnap(resolved)
Bootsnap::LoadPathCache.loaded_features_index.register(string_path, resolved)
return ret
end
|
Extracted source (around line #30):
28
29
30
31
32
33
|
else
# Note that require registers to $LOADED_FEATURES while load does not.
ret = require_without_bootsnap(resolved)
Bootsnap::LoadPathCache.loaded_features_index.register(string_path, resolved)
return ret
end
|
Extracted source (around line #26):
24
25
26
27
28
29
|
if loader = Zeitwerk::Registry.loader_for(path)
if path.end_with?(".rb")
required = zeitwerk_original_require(path)
loader.__on_file_autoloaded(path) if required
required
else
|
Extracted source (around line #273):
271
272
273
274
275
276
|
def constantize(camel_cased_word)
if camel_cased_word.blank? || !camel_cased_word.include?("::")
Object.const_get(camel_cased_word)
else
names = camel_cased_word.split("::")
|
Extracted source (around line #273):
271
272
273
274
275
276
|
def constantize(camel_cased_word)
if camel_cased_word.blank? || !camel_cased_word.include?("::")
Object.const_get(camel_cased_word)
else
names = camel_cased_word.split("::")
|
Extracted source (around line #74):
72
73
74
75
76
77
|
# See ActiveSupport::Inflector.constantize.
def constantize
ActiveSupport::Inflector.constantize(self)
end
# +safe_constantize+ tries to find a declared constant with the name specified
|
Extracted source (around line #176):
174
175
176
177
178
179
|
helper_prefix = module_or_helper_prefix.to_s
helper_prefix = helper_prefix.camelize unless helper_prefix.start_with?(/[A-Z]/)
"#{helper_prefix}Helper".constantize
else
raise ArgumentError, "helper must be a String, Symbol, or Module"
end
|
Extracted source (around line #169):
167
168
169
170
171
172
|
# returns an array with the corresponding modules, in the same order.
def modules_for_helpers(modules_or_helper_prefixes)
modules_or_helper_prefixes.flatten.map! do |module_or_helper_prefix|
case module_or_helper_prefix
when Module
module_or_helper_prefix
|
Extracted source (around line #169):
167
168
169
170
171
172
|
# returns an array with the corresponding modules, in the same order.
def modules_for_helpers(modules_or_helper_prefixes)
modules_or_helper_prefixes.flatten.map! do |module_or_helper_prefix|
case module_or_helper_prefix
when Module
module_or_helper_prefix
|
Extracted source (around line #104):
102
103
104
105
106
107
|
def modules_for_helpers(args)
args += all_application_helpers if args.delete(:all)
super(args)
end
# Returns a list of helper names in a given path.
|
Extracted source (around line #147):
145
146
147
148
149
150
|
#
def helper(*args, &block)
modules_for_helpers(args).each do |mod|
next if _helpers.include?(mod)
_helpers_for_modification.include(mod)
end
|
Extracted source (around line #204):
202
203
204
205
206
207
|
def default_helper_module!
helper_prefix = name.delete_suffix("Controller")
helper(helper_prefix)
rescue NameError => e
raise unless e.missing_name?("#{helper_prefix}Helper")
end
|
Extracted source (around line #51):
49
50
51
52
53
54
|
klass._helpers = nil
klass.class_eval { default_helper_module! } unless klass.anonymous?
super
end
|
Extracted source (around line #51):
49
50
51
52
53
54
|
klass._helpers = nil
klass.class_eval { default_helper_module! } unless klass.anonymous?
super
end
|
Extracted source (around line #51):
49
50
51
52
53
54
|
klass._helpers = nil
klass.class_eval { default_helper_module! } unless klass.anonymous?
super
end
|
Extracted source (around line #219):
217
218
219
220
221
222
|
module ClassMethods
def inherited(klass) # :nodoc:
super
klass._write_layout_method
end
|
Extracted source (around line #23):
21
22
23
24
25
26
|
def inherited(klass)
klass.setup_renderer!
super
end
end
|
Extracted source (around line #10):
8
9
10
11
12
13
|
module ClassMethods
def inherited(klass) # :nodoc:
super
klass.setup_param_encode
end
|
Extracted source (around line #241):
239
240
241
242
243
244
|
klass._wrapper_options = params
end
super
end
end
|
Extracted source (around line #9):
7
8
9
10
11
12
|
Module.new do
define_method(:inherited) do |klass|
super(klass)
namespace = klass.module_parents.detect { |m| m.respond_to?(:railtie_routes_url_helpers) }
actual_routes = namespace ? namespace.railtie_routes_url_helpers._routes : routes
|
Extracted source (around line #7):
5
6
7
8
9
10
|
module Helpers
def inherited(klass)
super
return unless klass.respond_to?(:helpers_path=)
if namespace = klass.module_parents.detect { |m| m.respond_to?(:railtie_helpers_paths) }
|
Extracted source (around line #1):
1
2
3
4
5
6
|
class ApplicationController < ActionController::Base
include Pundit::Authorization
after_action do
ActiveRecord::Base.clear_active_connections!
end
|
Extracted source (around line #30):
28
29
30
31
32
33
|
else
# Note that require registers to $LOADED_FEATURES while load does not.
ret = require_without_bootsnap(resolved)
Bootsnap::LoadPathCache.loaded_features_index.register(string_path, resolved)
return ret
end
|
Extracted source (around line #30):
28
29
30
31
32
33
|
else
# Note that require registers to $LOADED_FEATURES while load does not.
ret = require_without_bootsnap(resolved)
Bootsnap::LoadPathCache.loaded_features_index.register(string_path, resolved)
return ret
end
|
Extracted source (around line #26):
24
25
26
27
28
29
|
if loader = Zeitwerk::Registry.loader_for(path)
if path.end_with?(".rb")
required = zeitwerk_original_require(path)
loader.__on_file_autoloaded(path) if required
required
else
|
Extracted source (around line #1):
1
2
3
4
5
6
|
class JobsController < ApplicationController
include Pagy::Backend
include JobsHelper
before_action :set_job, only: [:show]
before_action :set_back_link, only: [:show]
after_action :send_email_to_job_creater, only: [:update_job_status]
|
Extracted source (around line #30):
28
29
30
31
32
33
|
else
# Note that require registers to $LOADED_FEATURES while load does not.
ret = require_without_bootsnap(resolved)
Bootsnap::LoadPathCache.loaded_features_index.register(string_path, resolved)
return ret
end
|
Extracted source (around line #30):
28
29
30
31
32
33
|
else
# Note that require registers to $LOADED_FEATURES while load does not.
ret = require_without_bootsnap(resolved)
Bootsnap::LoadPathCache.loaded_features_index.register(string_path, resolved)
return ret
end
|
Extracted source (around line #26):
24
25
26
27
28
29
|
if loader = Zeitwerk::Registry.loader_for(path)
if path.end_with?(".rb")
required = zeitwerk_original_require(path)
loader.__on_file_autoloaded(path) if required
required
else
|
Extracted source (around line #273):
271
272
273
274
275
276
|
def constantize(camel_cased_word)
if camel_cased_word.blank? || !camel_cased_word.include?("::")
Object.const_get(camel_cased_word)
else
names = camel_cased_word.split("::")
|
Extracted source (around line #273):
271
272
273
274
275
276
|
def constantize(camel_cased_word)
if camel_cased_word.blank? || !camel_cased_word.include?("::")
Object.const_get(camel_cased_word)
else
names = camel_cased_word.split("::")
|
Extracted source (around line #19):
17
18
19
20
21
22
|
def constantize(cpath)
ActiveSupport::Inflector.constantize(cpath)
end
def safe_constantize(cpath)
|
Extracted source (around line #93):
91
92
93
94
95
96
|
const_name = controller_param.camelize << "Controller"
begin
ActiveSupport::Dependencies.constantize(const_name)
rescue NameError => error
if error.missing_name == const_name || const_name.start_with?("#{error.missing_name}::")
raise MissingController.new(error.message, error.name)
|
Extracted source (around line #95):
93
94
95
96
97
98
|
def self.action_encoding_template(request, controller, action) # :nodoc:
request.controller_class_for(controller).action_encoding_template(action)
rescue MissingController
nil
end
|
Extracted source (around line #83):
81
82
83
84
85
86
|
class CustomParamEncoder # :nodoc:
def self.encode(request, params, controller, action)
return params unless controller && controller.valid_encoding? && encoding_template = action_encoding_template(request, controller, action)
params.except(:controller, :action).each do |key, value|
ActionDispatch::Request::Utils.each_param_value(value) do |param|
if encoding_template[key.to_s]
|
Extracted source (around line #45):
43
44
45
46
47
48
|
def self.set_binary_encoding(request, params, controller, action)
CustomParamEncoder.encode(request, params, controller, action)
end
class ParamEncoder # :nodoc:
|
Extracted source (around line #68):
66
67
68
69
70
71
|
delete_header("action_dispatch.request.parameters")
parameters = Request::Utils.set_binary_encoding(self, parameters, parameters[:controller], parameters[:action])
# If any of the path parameters has an invalid encoding then
# raise since it's likely to trigger errors further on.
Request::Utils.check_param_encoding(parameters)
|
Extracted source (around line #48):
46
47
48
49
50
51
|
}
req.path_parameters = tmp_params
status, headers, body = route.app.serve(req)
|
Extracted source (around line #32):
30
31
32
33
34
35
|
def serve(req)
find_routes(req).each do |match, parameters, route|
set_params = req.path_parameters
path_info = req.path_info
script_name = req.script_name
|
Extracted source (around line #32):
30
31
32
33
34
35
|
def serve(req)
find_routes(req).each do |match, parameters, route|
set_params = req.path_parameters
path_info = req.path_info
script_name = req.script_name
|
Extracted source (around line #842):
840
841
842
843
844
845
|
req = make_request(env)
req.path_info = Journey::Router::Utils.normalize_path(req.path_info)
@router.serve(req)
end
def recognize_path(path, environment = {})
|
Extracted source (around line #202):
200
201
202
203
204
205
|
end
@app.call(env)
end
def warn_if_using_get_on_request_path
|
Extracted source (around line #169):
167
168
169
170
171
172
|
# @param [Hash] The Rack environment.
def call(env)
dup.call!(env)
end
# The logic for dispatching any additional actions that need
|
Extracted source (around line #44):
42
43
44
45
46
47
|
def call(env)
to_app.call(env)
end
end
end
|
Extracted source (around line #44):
42
43
44
45
46
47
|
def call(env)
status, headers, body = @app.call(env)
headers = Utils::HeaderHash[headers]
unless should_deflate?(env, status, headers, body)
|
Extracted source (around line #15):
13
14
15
16
17
18
|
def call(env)
env[RACK_TEMPFILES] ||= []
status, headers, body = @app.call(env)
body_proxy = BodyProxy.new(body) do
env[RACK_TEMPFILES].each(&:close!) unless env[RACK_TEMPFILES].nil?
end
|
Extracted source (around line #27):
25
26
27
28
29
30
|
def call(env)
status, headers, body = @app.call(env)
headers = Utils::HeaderHash[headers]
|
Extracted source (around line #27):
25
26
27
28
29
30
|
case env[REQUEST_METHOD]
when "GET", "HEAD"
status, headers, body = @app.call(env)
headers = Utils::HeaderHash[headers]
if status == 200 && fresh?(env, headers)
status = 304
|
Extracted source (around line #12):
10
11
12
13
14
15
|
def call(env)
status, headers, body = @app.call(env)
if env[REQUEST_METHOD] == HEAD
[
|
Extracted source (around line #22):
20
21
22
23
24
25
|
def call(env)
request = ActionDispatch::Request.new(env)
_, headers, _ = response = @app.call(env)
return response unless html_response?(headers)
return response if policy_present?(headers)
|
Extracted source (around line #19):
17
18
19
20
21
22
|
def call(env)
request = ActionDispatch::Request.new env
_, headers, _ = response = @app.call(env)
return response if policy_present?(headers)
|
Extracted source (around line #266):
264
265
266
267
268
269
|
req = make_request env
prepare_session(req)
status, headers, body = app.call(req.env)
res = Rack::Response::Raw.new status, headers
commit_session(req, res)
[status, headers, body]
|
Extracted source (around line #260):
258
259
260
261
262
263
|
def call(env)
context(env)
end
def context(env, app = @app)
|
Extracted source (around line #697):
695
696
697
698
699
700
|
request = ActionDispatch::Request.new env
status, headers, body = @app.call(env)
if request.have_cookie_jar?
cookie_jar = request.cookie_jar
|
Extracted source (around line #601):
599
600
601
602
603
604
|
end
@app.call(env)
end
private
|
Extracted source (around line #27):
25
26
27
28
29
30
|
error = nil
result = run_callbacks :call do
@app.call(env)
rescue => error
end
raise error if error
|
Extracted source (around line #98):
96
97
98
99
100
101
|
if callbacks.empty?
yield if block_given?
else
env = Filters::Environment.new(self, false, nil)
next_sequence = callbacks.compile
|
Extracted source (around line #26):
24
25
26
27
28
29
|
def call(env)
error = nil
result = run_callbacks :call do
@app.call(env)
rescue => error
end
|
Extracted source (around line #14):
12
13
14
15
16
17
|
state = @executor.run!(reset: true)
begin
response = @app.call(env)
returned = response << ::Rack::BodyProxy.new(response.pop) { state.complete! }
ensure
state.complete! unless returned
|
Extracted source (around line #18):
16
17
18
19
20
21
|
def call(env)
request = ActionDispatch::Request.new(env)
return @app.call(env) unless actionable_request?(request)
ActiveSupport::ActionableError.dispatch(request.params[:error].to_s.safe_constantize, request.params[:action])
|
Extracted source (around line #29):
27
28
29
30
31
32
|
def call(env)
request = ActionDispatch::Request.new env
_, headers, body = response = @app.call(env)
if headers["X-Cascade"] == "pass"
body.close if body.respond_to?(:close)
|
Extracted source (around line #132):
130
131
132
133
134
135
|
def call_app(env)
@app.call(env)
rescue => e
throw :app_exception, e
end
|
Extracted source (around line #19):
17
18
19
20
21
22
|
app_exception = catch :app_exception do
request = create_regular_or_whiny_request(env)
return call_app(env) unless request.permitted?
if id = id_for_repl_session_update(request)
return update_repl_session(id, request)
|
Extracted source (around line #17):
15
16
17
18
19
20
|
def call(env)
app_exception = catch :app_exception do
request = create_regular_or_whiny_request(env)
return call_app(env) unless request.permitted?
|
Extracted source (around line #17):
15
16
17
18
19
20
|
def call(env)
app_exception = catch :app_exception do
request = create_regular_or_whiny_request(env)
return call_app(env) unless request.permitted?
|
Extracted source (around line #33):
31
32
33
34
35
36
|
def call(env)
request = ActionDispatch::Request.new env
@app.call(env)
rescue Exception => exception
if request.show_exceptions?
render_exception(request, exception)
|
Extracted source (around line #37):
35
36
37
38
39
40
|
instrumenter.start "request.action_dispatch", request: request
logger.info { started_request_message(request) }
status, headers, body = @app.call(env)
body = ::Rack::BodyProxy.new(body) { finish(request) }
[status, headers, body]
rescue Exception
|
Extracted source (around line #26):
24
25
26
27
28
29
|
if logger.respond_to?(:tagged)
logger.tagged(compute_tags(request)) { call_app(request, env) }
else
call_app(request, env)
end
|
Extracted source (around line #99):
97
98
99
100
101
102
|
def tagged(*tags)
if block_given?
formatter.tagged(*tags) { yield self }
else
logger = ActiveSupport::TaggedLogging.new(self)
logger.formatter.extend LocalTagStorage
|
Extracted source (around line #37):
35
36
37
38
39
40
|
def tagged(*tags)
new_tags = push_tags(*tags)
yield self
ensure
pop_tags(new_tags.size)
end
|
Extracted source (around line #99):
97
98
99
100
101
102
|
def tagged(*tags)
if block_given?
formatter.tagged(*tags) { yield self }
else
logger = ActiveSupport::TaggedLogging.new(self)
logger.formatter.extend LocalTagStorage
|
Extracted source (around line #26):
24
25
26
27
28
29
|
if logger.respond_to?(:tagged)
logger.tagged(compute_tags(request)) { call_app(request, env) }
else
call_app(request, env)
end
|
Extracted source (around line #13):
11
12
13
14
15
16
|
::Rails.logger.silence { @app.call(env) }
else
@app.call(env)
end
end
end
|
Extracted source (around line #81):
79
80
81
82
83
84
|
req = ActionDispatch::Request.new env
req.remote_ip = GetIp.new(req, check_ip, proxies)
@app.call(req.env)
end
# The GetIp class exists as a way to defer processing of the request data
|
Extracted source (around line #26):
24
25
26
27
28
29
|
req = ActionDispatch::Request.new env
req.request_id = make_request_id(req.headers[@header])
@app.call(env).tap { |_status, headers, _body| headers[@header] = req.request_id }
end
private
|
Extracted source (around line #24):
22
23
24
25
26
27
|
end
@app.call(env)
end
def method_override(env)
|
Extracted source (around line #22):
20
21
22
23
24
25
|
def call(env)
start_time = Utils.clock_time
status, headers, body = @app.call(env)
headers = Utils::HeaderHash[headers]
request_time = Utils.clock_time - start_time
|
Extracted source (around line #29):
27
28
29
30
31
32
|
def call(env)
LocalCacheRegistry.set_cache_for(local_cache_key, LocalStore.new)
response = @app.call(env)
response[2] = ::Rack::BodyProxy.new(response[2]) do
LocalCacheRegistry.set_cache_for(local_cache_key, nil)
end
|
Extracted source (around line #14):
12
13
14
15
16
17
|
state = @executor.run!(reset: true)
begin
response = @app.call(env)
returned = response << ::Rack::BodyProxy.new(response.pop) { state.complete! }
ensure
state.complete! unless returned
|
Extracted source (around line #24):
22
23
24
25
26
27
|
def call(env)
@file_handler.attempt(env) || @app.call(env)
end
end
|
Extracted source (around line #110):
108
109
110
111
112
113
|
def call(env)
status, headers, body = @app.call(env)
if body.respond_to?(:to_path)
case type = variation(env)
when 'X-Accel-Redirect'
|
Extracted source (around line #148):
146
147
148
149
150
151
|
if authorized?(request) || excluded?(request)
mark_as_authorized(request)
@app.call(env)
else
@response_app.call(env)
end
|
Extracted source (around line #51):
49
50
51
52
53
54
|
begin
response = @app.call(env)
rescue Error
raise # Don't capture Raven errors
rescue Exception => e
|
Extracted source (around line #23):
21
22
23
24
25
26
|
super(env)
else
@app.call(env)
end
end
|
Extracted source (around line #87):
85
86
87
88
89
90
|
def call(env)
rewrite_response(perform_request(rewrite_env(env)))
end
# Return modified env
|
Extracted source (around line #539):
537
538
539
540
541
542
|
def call(env)
req = build_request env
app.call req.env
end
# Defines additional Rack env configuration that is added on each call.
|
Extracted source (around line #228):
226
227
228
229
230
231
|
def call(env)
env[Const::PUMA_CONFIG] = @config
@app.call(env)
end
end
|
Extracted source (around line #727):
725
726
727
728
729
730
|
begin
begin
status, headers, res_body = @app.call(env)
return :async if req.hijacked
|
Extracted source (around line #476):
474
475
476
477
478
479
|
while true
case handle_request(client, buffer)
when false
return
when :async
|
Extracted source (around line #332):
330
331
332
333
334
335
|
else
if process_now
process_client client, buffer
else
client.set_timeout @first_data_timeout
@reactor.add client
|
Extracted source (around line #134):
132
133
134
135
136
137
|
begin
block.call(work, *extra)
rescue Exception => e
STDERR.puts "Error reached top of thread-pool: #{e.message} (#{e.class})"
end
|
Rails.root: /opt
Request
Parameters:
None
GATEWAY_INTERFACE: "CGI/1.2"
HTTP_ACCEPT: "*/*"
HTTP_VERSION: "HTTP/1.1"
HTTP_X_FORWARDED_FOR: "54.224.90.25, 66.241.124.72"
ORIGINAL_SCRIPT_NAME: ""
REMOTE_ADDR: "172.16.133.194"
SERVER_NAME: "productions.com"
SERVER_PROTOCOL: "HTTP/1.1"
Response
Headers:
None