Top Level Namespace

Defined Under Namespace

Modules: Associatable, ControllerCallbacks, ModelCallbacks, RailsLite, Searchable, UrlHelpers, Validations Classes: Album, AlbumsController, ApplicationController, ApplicationModel, AssocOptions, Band, BandsController, BelongsToOptions, ControllerBase, DBConnection, FileServer, Flash, FlashNow, HasManyOptions, ModelBase, Note, NotesController, Relation, Route, Router, Session, SessionsController, ShowExceptions, Static, StrongParams, Track, TracksController, User, UsersController, Validator

Constant Summary collapse

ENV['PRINT_QUERIES'] == 'true'
ROOT_FOLDER =
File.join(File.dirname(__FILE__), '..', '..')
SQL_FILE =
File.join(ROOT_FOLDER, 'db', 'database.sql')
DB_FILE =
File.join(ROOT_FOLDER, 'db', 'database.db')

Instance Method Summary collapse

Instance Method Details

#create_routes(router) ⇒ Object



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/scaffold/config/routes.rb', line 1

def create_routes(router)
  router.draw do

    root to: 'bands#index'

    resource :sessions, only: [:new, :create, :destroy]

    resources :users, only: [:show, :new, :create]

    resources :bands do
      collection do
        get :json
      end
      resources :albums, only: [:new]
    end

    resources :albums, only: [:show, :create, :edit, :update, :destroy] do
      resources :tracks, only: [:new]
    end

    resources :tracks, only: [:show, :create, :edit, :update, :destroy,]

    resources :notes, only: [:create, :destroy]
  end

end