porras (owner)

Revisions

gist: 223738 Download_button fork
public
Public Clone URL: git://gist.github.com/223738.git
Embed All Files: show embed
asset.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class Asset < ActiveRecord::Base
  
  class << self
    def method_missing(meth, *args, &blk)
      if asset = first(:conditions => {:name => meth.to_s})
        asset.value
      else
        super
      end
    end
  end
  
end