Method: Godmin::AuthenticationGenerator#modify_model
- Defined in:
- lib/generators/godmin/authentication/authentication_generator.rb
#modify_model ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/generators/godmin/authentication/authentication_generator.rb', line 10 def modify_model inject_into_file File.join("app/models", class_path, "#{file_name}.rb"), after: "ActiveRecord::Base\n" do <<-END.strip_heredoc.indent(namespace ? 4 : 2) include Godmin::Authentication::User def self.login_column :email end END end end |