Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# app/controllers/application_controller.rb
def add_message(type, text)
@messages ||= []
@messages.push({type: type, text: text})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.