title: how to identify the method name that calling the particular function?
body: <p>I want to change the subject of  mail according to actions(create, update), that call the mailer. How to do this? (ex. during creation, subject is User created and for update , user updated)</p>
  
  <pre><code>def create
  @user = User.new(params[:user])
  @user.save
  Mailer.notify(@user).deliver 
  end
  def update
  @user = User.find(params[:id])
  @user.update
  Mailer.notify(@user).deliver
  end
  </code></pre>
  
  <p>mailers.rb</p>
  
  <pre><code>def notify(user)
  @user =user
  mail(:to =&gt;@use.mail  :subject =&gt; "created")
  end
  </code></pre>