Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lolaodelola/8334edd4fc86fe58e573b2412f8339c5 to your computer and use it in GitHub Desktop.
Save lolaodelola/8334edd4fc86fe58e573b2412f8339c5 to your computer and use it in GitHub Desktop.
def landing
render 'landing'
end
def new
@affirmation = Affirmation.new
end
def create
Affirmation.create!(affirmation_params)
redirect_to new_affirmation_path, notice: 'Your affirmation has been created! How about another one?'
end
private
def affirmation_params
params.require(:affirmation).permit(:body)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment