Created
March 28, 2019 08:48
-
-
Save MaryKuz/dbf2234c17f3ba2551937b5f97a05da2 to your computer and use it in GitHub Desktop.
Plan API architecture
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApplicationController < ActionController::Base | |
... | |
def new | |
initialize_resource | |
end | |
def create | |
build_resource | |
resource.save! | |
end | |
def update | |
resource.update! resource_params | |
end | |
def destroy | |
resource.destroy! | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment