Class: ActiveRecord::Generators::AuthistGenerator
- Inherits:
-
Base
- Object
- Base
- ActiveRecord::Generators::AuthistGenerator
- Defined in:
- lib/generators/active_record/authist_generator.rb
Instance Method Summary collapse
Instance Method Details
#include_authism_in_model ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/generators/active_record/authist_generator.rb', line 10 def include_authism_in_model class_path = if namespaced? class_name.to_s.split("::") else [class_name] end inject_into_class File.join("app", "models", "#{file_path}.rb"), class_path.last, " include Authist::Authism\n" end |