Sha256: a5381e0cde4105d5320ea2feac51576f80637f346644dc0f490eaf4cd73f1240

Contents?: true

Size: 357 Bytes

Versions: 92

Compression:

Stored size: 357 Bytes

Contents

require 'rails/generators'

module Pageflow
  module Generators
    class UserGenerator < Rails::Generators::Base
      desc "Injects the Pageflow::User mixin into the User class."

      def include_mixin
        inject_into_file 'app/models/user.rb', before: /end$/ do
          "\n  include Pageflow::UserMixin\n"
        end
      end
    end
  end
end

Version data entries

92 entries across 92 versions & 1 rubygems

Version Path
pageflow-17.0.4 lib/generators/pageflow/user/user_generator.rb
pageflow-17.0.3 lib/generators/pageflow/user/user_generator.rb
pageflow-17.0.2 lib/generators/pageflow/user/user_generator.rb
pageflow-17.0.1 lib/generators/pageflow/user/user_generator.rb
pageflow-17.0.0 lib/generators/pageflow/user/user_generator.rb
pageflow-16.2.0 lib/generators/pageflow/user/user_generator.rb
pageflow-16.1.0 lib/generators/pageflow/user/user_generator.rb
pageflow-16.0.0 lib/generators/pageflow/user/user_generator.rb
pageflow-15.8.0 lib/generators/pageflow/user/user_generator.rb
pageflow-14.5.2 lib/generators/pageflow/user/user_generator.rb
pageflow-15.7.1 lib/generators/pageflow/user/user_generator.rb
pageflow-15.7.0 lib/generators/pageflow/user/user_generator.rb
pageflow-15.6.1 lib/generators/pageflow/user/user_generator.rb
pageflow-15.6.0 lib/generators/pageflow/user/user_generator.rb
pageflow-15.5.0 lib/generators/pageflow/user/user_generator.rb
pageflow-15.4.0 lib/generators/pageflow/user/user_generator.rb
pageflow-15.3.0 lib/generators/pageflow/user/user_generator.rb
pageflow-15.2.2 lib/generators/pageflow/user/user_generator.rb
pageflow-15.2.1 lib/generators/pageflow/user/user_generator.rb
pageflow-15.2.0 lib/generators/pageflow/user/user_generator.rb