Calls between methods of application.rb

I have a set_lang() and a write_to_log() method in

set_lang() calls write_to_log().

Nothing happens. I should expect that write_to_log is either called or
an exception is thrown. However, it seems that it is silently ignored.
To prove this I called write_to_log00(), which does not exist. Still
the same behavior.

Is this normal?

To make things more specific, here is my code:

file: app/controllers/application.rb

def write_to_log(msg)“logfile.txt”, “a”) do |file|
now =

def set_lang
code = params[:id]
if code != “el” && code != “en” && code != “de”
code = “el”
@lang = code

write_to_log("set_lang\t" + code)

cookies[:lang] =
    :value => code,
    :expires => + 1.year,
    :path => '/'
# redisplay the page in the new language
redirect_to  request.env["HTTP_REFERER"]


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs