Sha256: 68a872c863bbd56ec7e659ff5a52aa8ce05678ddaa8020cee94dd3e651c3d3c0

Contents?: true

Size: 474 Bytes

Versions: 1

Compression:

Stored size: 474 Bytes

Contents

class ReputationAction < ActiveRecord::Base
  has_many :reputations, :dependent=>:destroy
  
  def self.list_from_rails_source
    list = []
    files = Dir.glob("{#{Rails.root.to_s},#{SocialEngine::Engine.root.to_s}}/app/{controllers,models}/**/*.rb")
    files.each do |file|
      source = IO.read(file)
      source.scan(/(Reputation.add|add_able_rep)\(("|')(.*)("|'),.*\)/).each do |line|
        list << line[2] if line[2].present?
      end
    end
    list
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
social_engine-0.0.1 app/models/reputation_action.rb