Class: Rails::Forms::Create
- Inherits:
-
ShopifyCli::Form
- Object
- ShopifyCli::Form
- Rails::Forms::Create
- Defined in:
- lib/project_types/rails/forms/create.rb
Constant Summary collapse
- VALID_DB_TYPES =
['sqlite3', 'mysql', 'postgresql', 'sqlite3', 'oracle', 'frontbase', 'ibm_db', 'sqlserver', 'jdbcmysql', 'jdbcsqlite3', 'jdbcpostgresql', 'jdbc']
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Attributes inherited from ShopifyCli::Form
Instance Method Summary collapse
Methods inherited from ShopifyCli::Form
ask, flag_arguments, #initialize, positional_arguments
Constructor Details
This class inherits a constructor from ShopifyCli::Form
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/project_types/rails/forms/create.rb', line 6 def name @name end |
Instance Method Details
#ask ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/project_types/rails/forms/create.rb', line 21 def ask self.title ||= CLI::UI::Prompt.ask(ctx.('rails.forms.create.app_name')) self.type = ask_type self.name = self.title.downcase.split(" ").join("_") res = ShopifyCli::Tasks::SelectOrgAndShop.call(ctx, organization_id: organization_id, shop_domain: shop_domain) self.organization_id = res[:organization_id] self.shop_domain = res[:shop_domain] self.db = ask_db end |