Class: Phcscriptcdnpro::Script::AuthorsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Phcscriptcdnpro::Script::AuthorsController
- Defined in:
- app/controllers/phcscriptcdnpro/script/authors_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
CREATE - Script Author.
-
#destroy ⇒ Object
DELETE - Script Author.
-
#edit ⇒ Object
EDIT - Script Author.
-
#index ⇒ Object
INDEX - Script Author.
-
#new ⇒ Object
NEW - Script Author.
-
#show ⇒ Object
DETAILS - Script Author.
-
#update ⇒ Object
PATCH/PUT - Script Author.
Methods inherited from ApplicationController
#current_user, #get_member_profile_info, #membership_info, #new_login_url, #phcpress_recent_posts, #require_user
Instance Method Details
#create ⇒ Object
CREATE - Script Author
29 30 31 32 33 34 35 36 |
# File 'app/controllers/phcscriptcdnpro/script/authors_controller.rb', line 29 def create @script_author = Script::Author.new() if @script_author.save redirect_to , notice: 'Author was successfully created.' else render :new end end |
#destroy ⇒ Object
DELETE - Script Author
48 49 50 51 |
# File 'app/controllers/phcscriptcdnpro/script/authors_controller.rb', line 48 def destroy @script_author.destroy redirect_to , notice: 'Author was successfully destroyed.' end |
#edit ⇒ Object
EDIT - Script Author
25 26 |
# File 'app/controllers/phcscriptcdnpro/script/authors_controller.rb', line 25 def edit end |
#index ⇒ Object
INDEX - Script Author
11 12 13 |
# File 'app/controllers/phcscriptcdnpro/script/authors_controller.rb', line 11 def index @script_authors = Script::Author.all end |
#new ⇒ Object
NEW - Script Author
20 21 22 |
# File 'app/controllers/phcscriptcdnpro/script/authors_controller.rb', line 20 def new @script_author = Script::Author.new end |
#show ⇒ Object
DETAILS - Script Author
16 17 |
# File 'app/controllers/phcscriptcdnpro/script/authors_controller.rb', line 16 def show end |
#update ⇒ Object
PATCH/PUT - Script Author
39 40 41 42 43 44 45 |
# File 'app/controllers/phcscriptcdnpro/script/authors_controller.rb', line 39 def update if @script_author.update() redirect_to , notice: 'Author was successfully updated.' else render :edit end end |