Class: ReputationAction
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- ReputationAction
- Defined in:
- app/models/reputation_action.rb
Class Method Summary collapse
Class Method Details
.list_from_rails_source ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'app/models/reputation_action.rb', line 4 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 |