NycDevshop

Nyc devshop is an internal gem for the company NYC Devshop created by Yanik Jayaram which contains custom generators for the purpose of auto-generating commonly used assets, configs, gems, controllers, routes, models and views

Usage

In its current state, this gem should be used once and only once upon creation of your application.

couple of things to note:

  • the controllers will be set up assuming you are using rails4.

  • the strong parameters will not be auto-filled in the controllers. You must do this yourself

  1. Add the following line to your gemfile:

    gem 'nyc_devshop'
    
  2. Run the following command:

    $ bundle install
    
  3. Run the following command:

    $ rails g devshop_gems
    
  4. Run the following command, passing the app name (ex, ‘MyApp’) as an argument:

    $ rails g devshop MyApp
    
  5. Create and migrate any models for which you want CRUD actions and views to be created in your admin panel (with the exception of an Administrator model, which is automatically created for you via the generators).

    e.g.
      $ rails g model User first_name last_name email
      $ rake db:migrate
    
  6. Run the following command, passing the names of the migrated models for which you want CRUD actions and views to be be created in your admin panel (formatting must be singular, lowercase, and space separated (*NO COMMAS*)):

    e.g.
      $ rails g devshop_admin administrator user
    
  7. Results

    * Start your rails server and you should see a dummy public index page
    * Go to http://localhost:3000/admin to see an admin login page. Login credentials are 
      login: '[email protected]'
     password: '123'
     You should see your resources with associated crud actions.