also, i dont know what does (function()) mean in Ruby on rails. Its not simple function(), why is it inside brackets?
Second example
def current_user
@current_user ||= User.find(session[:user_id]) if session[:user_id]
end
(function() {
this.App || (this.App = {});
App.cable = ActionCable.createConsumer();
}).call(this);
I have this example And i wanna understand what it is "