Sha256: 69f8180ac5e5bc414a9e833f4f29771b6a931692adab87178de9e55a00c14869
Contents?: true
Size: 1.02 KB
Versions: 12
Compression:
Stored size: 1.02 KB
Contents
class MobileApplicationGenerator < Rails::Generators::NamedBase source_root File.expand_path('../templates', __FILE__) argument :description, :type => :string argument :icon, :type => :string def generate_mobile_application #Controller template "controllers/controller_template.erb", "app/controllers/erp_app/mobile/#{file_name}/base_controller.rb" #make javascript template "public/app.js.erb", "public/javascripts/erp_app/mobile/applications/#{file_name}/app.js" #make css folder empty_directory "public/stylesheets/erp_app/mobile/applications/#{file_name}" #make images folder empty_directory "public/images/erp_app/mobile/applications/#{file_name}" #add route route "match '/erp_app/mobile/#{file_name}(/:action)' => \"erp_app/mobile/#{file_name}/base\"" #migration template "migrate/migration_template.erb", "db/data_migrations/#{RussellEdge::DataMigrator.next_migration_number(1)}_create_#{file_name}_mobile_application.rb" end end
Version data entries
12 entries across 12 versions & 1 rubygems