Sha256: c886e5949436586c0756ceda01d32ec54265e80779bc06344ae99a1d6b477e27
Contents?: true
Size: 684 Bytes
Versions: 7
Compression:
Stored size: 684 Bytes
Contents
class EnjuLibrary::SetupGenerator < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) argument :file, :type => :string, :default => "all" def copy_setup_files directory("db/fixtures", "db/fixtures/enju_library") return if file == 'fixture' inject_into_class 'app/controllers/application_controller.rb', ApplicationController, " include EnjuLibrary::Controller\n" append_to_file("app/models/user.rb", "Item.include(EnjuLibrary::EnjuItem)\n") gsub_file 'app/models/user.rb', /, :validatable$/, <<EOS , # :validatable, :lockable, lock_strategy: :none, unlock_strategy: :none include EnjuSeed::EnjuUser EOS end end
Version data entries
7 entries across 7 versions & 1 rubygems