mod/account/set/right/account.rb in card-1.93.0 vs mod/account/set/right/account.rb in card-1.93.1

- old
+ new

@@ -29,12 +29,16 @@ tcard.validate! test_token copy_errors tcard errors.empty? end -def refreshed_token # TODO: explain why needed - token_card.refresh(true).db_content +def refreshed_token + if token_card.id + token_card.refresh(true).db_content # TODO: explain why refresh is needed + else # eg when viewing email template + "[token]" + end end format do view :verify_url do card_url path({ mark: card.name.left }.merge(token_path_opts)) @@ -58,18 +62,14 @@ end format :html do view :raw do # FIXME: use field_nest instead of parsing content - # Problem: whey you do that then the fields are missing in the sign up form - # output( - # [ - # field_nest(:email, view: :titled, title: "email"), - # field_nest(:password, view: :titled, title: "password") - # ] - # ) - %({{+#{Card[:email].name}|titled;title:email}} - {{+#{Card[:password].name}|titled;title:password}}) + # Problem: when you do that then the fields are missing in the sign up form: + # output( [field_nest(:email, view: :titled, title: "email"), + # field_nest(:password, view: :titled, title: "password")]) + %({{+#{:email.cardname}|titled;title:email}} + {{+#{:password.cardname}|titled;title:password}}) end view :edit do voo.structure = true voo.edit_structure = [[:email, "email"], [:password, "password"]]