undefined local variable or method `eee'
module CheckDbController
extend ActiveSupport::Concern
def еее
puts 'fdfdf'
end
end
class ApplicationController < ActionController::Base
include CheckDbController
before_action :verify_log_in
def verify_log_in # Переход на страничку ввод логина и пароля, если не был произведен вход
puts eee
end
end
def children_code( codes )
sql = "SELECT code, bb.code IS NULL as error " +
"FROM UNNEST(ARRAY"+
codes.to_s.gsub( '"', '\'' ) +
") AS code " +
"LEFT JOIN children bb USING( code )"
children = JSON.parse( ActiveRecord::Base.connection.execute( sql ).to_json, symbolize_names: true )
end
puts children_code( ['000000012','000000013','0000000147','000000015','000000016','000000017','000000018'] )
aaa = UserAll
where(type: type) if type
where(name: name) if name
where(date: date) if date
const scriptRun = ( text, self ) => {
const script = document.createElement( 'script' );
script.innerHTML = text;
script.self = self;
document.head.appendChild( script );
};
class Test {
constructor( ) {
const textScript = `document.currentScript.self.cons();`;
scriptRun( textScript, this );
}
cons( ) {
console.log( 'Test')
}
}
class Test2 {
constructor( ) {
const textScript = `document.currentScript.self.cons2();`;
scriptRun( textScript, this );
}
cons2( ) {
console.log( 'Test2')
}
}
window.onload = () => {
const test = new Test; // Test
const test2 = new Test2; // Test2
};