Skip to main content

creating-a-new-app

Creating a new app​

An app (aka plugin) has components in several places:​

Assets:​

  • JS should be in assets/javascripts/apps
  • The filename needs to be added in /assets/javascripts/application
  • CSS should be in assets/stylesheets/apps
  • The filename needs to be added in /assets/stylesheets/application

Template files:​

  • View file should be views/apps/_theName.html.haml
  • Settings file should be views/apps/_theNameSettings.html.haml

App Details:​

Corresponding app details must be created (this sets the descriptions, price etc.) Technically, this only needs to be created in the database, but you should update the seeds file so that other environments can have this data too.

  • Go to db/seeds.rb and follow what is already there
  • Run rake db:seed
  • Note: changing something that is ALREADY in the database and running rake db:seed will not update anything. You should either delete that App Detail in your database and then run rake db:seed, OR just update the relevant attributes in your database.

BEFORE SETTING AN APPs STATUS TO ACTIVE​

When an app's status is 'active' on the live site, it will be visible on the /plugins page, /tutorials pages, and other places on the site. NEVER make an app active unless all the following are ready:

  • Add the correct app details for the app, including price and descriptions
  • Add a tutorial to views/auto_docs/apps
  • You may need to restart to the server to update the routes once an app is created, to do this on heroku, type: heroku restart

To change an apps status:​

  • To change an apps status, go to /admin/app-details and click edit on the app
  • There is a separate checkbox for each platform that requires a separate integration (facebook, wix, etc). Only make these active when launched on those platforms (this turns on the documentation)