6 Matching Annotations
  1. Nov 2022
    1. module InjectSession include Warden::Test::Helpers def inject_session(hash) Warden.on_next_request do |proxy| hash.each do |key, value| proxy.raw_session[key] = value end end end end
  2. Jun 2021
    1. I don't think it is too clever. I think it solves the problem idiomatically. I.e., it uses reduce, which is exactly correct. Programmers should be encouraged to understand what is correct, why it is correct, and then propagate. For a trivial operation like average, true, one doesn't need to be "clever". But by understanding what "reduce" is for a trivial case, one can then start applying it to much more complex problems. upvote.
  3. Mar 2021
    1. We’re not really using placeholder in our demo, but a value of a single space works:
    2. :placeholder-shown is super useful for us here! It’s basically the secret selector for testing if an input currently has a value or not.
  4. Oct 2020