codeunion / examples-sinatra

A repository of example Sinatra apps illustrating common patterns in web development
3 stars 16 forks source link

Flash message example #6

Closed tannerwelsh closed 9 years ago

tannerwelsh commented 9 years ago

An example application using Rack::Flash messages.

Displays error messages when resource fails to save:

screen shot 2015-02-21 at 6 19 57 pm

Displays confirmation message when resource saves successfully:

screen shot 2015-02-21 at 6 19 40 pm

tannerwelsh commented 9 years ago

@zspencer or @jfarmer mind giving this a once-over?

zspencer commented 9 years ago

Overall :+1: :tada: :balloon: :birthday:

Some thoughts:

  1. I don't know if this needs a database. We could do some dice-rolling and redirect the post to a get route or something. (But that isn't a common use case of flash, so it may be distracting). It's up to you to decide if you think it hurts or helps the clarity
  2. We may want to consider hosting a really bland stylesheet for rapid prototyping on these kinds of things; like a very-small subset of bootstrap. That way we don't have to copy-pasta this css all over the place.
tannerwelsh commented 9 years ago

Muchas gracias for the great feedback, @zspencer! I addressed many of your suggestions, and then contested a few others. No major disagreements, so I'm gonna go ahead and merge this.