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-12.5.0 lib/generators/pageflow/user/user_generator.rb
pageflow-12.4.1 lib/generators/pageflow/user/user_generator.rb
pageflow-13.0.0 lib/generators/pageflow/user/user_generator.rb
pageflow-13.0.0.rc1 lib/generators/pageflow/user/user_generator.rb
pageflow-12.4.0 lib/generators/pageflow/user/user_generator.rb
pageflow-12.3.0 lib/generators/pageflow/user/user_generator.rb
pageflow-13.0.0.beta7 lib/generators/pageflow/user/user_generator.rb
pageflow-13.0.0.beta6 lib/generators/pageflow/user/user_generator.rb
pageflow-13.0.0.beta5 lib/generators/pageflow/user/user_generator.rb
pageflow-13.0.0.beta4 lib/generators/pageflow/user/user_generator.rb
pageflow-13.0.0.beta3 lib/generators/pageflow/user/user_generator.rb
pageflow-13.0.0.beta2 lib/generators/pageflow/user/user_generator.rb
pageflow-13.0.0.beta1 lib/generators/pageflow/user/user_generator.rb
pageflow-12.2.0 lib/generators/pageflow/user/user_generator.rb
pageflow-12.1.0 lib/generators/pageflow/user/user_generator.rb
pageflow-12.0.4 lib/generators/pageflow/user/user_generator.rb
pageflow-12.0.3 lib/generators/pageflow/user/user_generator.rb
pageflow-12.0.2 lib/generators/pageflow/user/user_generator.rb
pageflow-12.0.1 lib/generators/pageflow/user/user_generator.rb
pageflow-12.0.0 lib/generators/pageflow/user/user_generator.rb