title: Ruby on Rails 4: Where i have to put Common code?
body: <p>I am new to Ruby on rails. i am using rails 4.1.6 and what i want is to make log of all the process in one text file <code>(like index page accessed, view page access etc..).</code> for that i want to create common function, in which i can pass my text as agrs, i had do some R&amp;D on that and i found this : <a href="https://stackoverflow.com/questions/21896093/in-rails-where-to-put-useful-functions-for-both-controllers-and-models">In Rails, where to put useful functions for both controllers and models</a>, but it seems that it is not working with active admin resources. so, for active admin controller and model, i have to create any other modules (i.e. on other location let say /admin/) or anything else i have to do ?</p>
  
  <p>is there any global location that we can use in active admin like component in cakephp.</p>
  
  <p>thanks</p>
  
  <p>EDIT</p>
  
  <p><code>app/admin/driver.rb</code></p>
  
  <pre><code>ActiveAdmin.register User, as: 'Driver' do
      ...
      ...
      index :download_links =&gt; false do
          ...
          ...
          #call function to maintain log something like,
          take_note('action performed')
      end
  </code></pre>