Sha256: dfb9990c8c4ff478d291410c4a277b9f46017bf47bc3b4f8b3158254edff39e0

Contents?: true

Size: 289 Bytes

Versions: 12

Compression:

Stored size: 289 Bytes

Contents

class WhowishWordFacebook < ActiveRecord::Base

  def word_for(field,*p)

     content = self[field].to_s

     if p.length > 0
        p = p[0]

        p.each_pair { |key,val|
          content.gsub!("{"+key.to_s+"}",val.to_s)
        }
      end

    content
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
whowish_word-0.2.1 lib/legacy/whowish_word/lib/app/models/mysql/whowish_word_facebook.rb
whowish_word-0.2.0 lib/legacy/whowish_word/lib/app/models/mysql/whowish_word_facebook.rb
whowish_word-0.1.9 lib/legacy/whowish_word/lib/app/models/mysql/whowish_word_facebook.rb
whowish_word-0.1.8 lib/legacy/whowish_word/lib/app/models/mysql/whowish_word_facebook.rb
whowish_word-0.1.7 lib/legacy/whowish_word/lib/app/models/mysql/whowish_word_facebook.rb
whowish_word-0.1.6 lib/legacy/whowish_word/lib/app/models/mysql/whowish_word_facebook.rb
whowish_word-0.1.5 lib/legacy/whowish_word/lib/app/models/mysql/whowish_word_facebook.rb
whowish_word-0.1.4 lib/legacy/whowish_word/lib/app/models/mysql/whowish_word_facebook.rb
whowish_word-0.1.3 lib/legacy/whowish_word/lib/app/models/mysql/whowish_word_facebook.rb
whowish_word-0.1.2 lib/legacy/whowish_word/lib/app/models/mysql/whowish_word_facebook.rb
whowish_word-0.1.1 lib/legacy/whowish_word/lib/app/models/mysql/whowish_word_facebook.rb
whowish_word-0.1.0 lib/legacy/whowish_word/lib/app/models/mysql/whowish_word_facebook.rb