Fix: edit_user_link rendering#3475
Conversation
|
Changes unknown |
|
Would you mind adding some tests for this fix? They should fit into somewhere around here: |
|
concerning the tests: sure, the only issue i had was getting rspec up and running when using sprockets. it failed at require sprockets/railstie - is this a known thing? will try webpacker later. as rspec did not start and the current specs just dont really care for the generated html, my first attempt was just to quick-fix the rendering issue. would love to add some actual improvements (i owe you :)) |
|
Ah you need to run rspec via appraisal, like this: $ appraisal rails-7.0 rspec spec/helpers/rails_admin/application_helper_spec.rb |
|
thanks, working now. question concerning is there any real world requirement for the |
if show_gravatar is e.g. `false`, "false" becomes part of the render output sa `false` is not removed on `.compact` if there is no edit-user action to be found, the output was 2 nested spans, which messed up layout.
b0c5351 to
2f4e153
Compare
|
@mshibuya paused now, as i changed quite a bit - if you are not entirely against these kind of changes, i`ll continue. the 'include Pundit::Authorization' commit is not PR-related, i can move it to another branch later too. |
Please don't do it now. You can propose these changes in a separate PR, but do not mix it with the issue fix. (And I personally think your style of writing specs has more downsides, it's less descriptive and needs more execution time. But this is not relevant here anyway...) |
6ec3499 to
cfd6d67
Compare
cfd6d67 to
9337bd1
Compare
|
Merged in, thanks! |
if
config.show_gravataris e.g.false, "false" becomes part of the render output asfalseis not nil and therefore not removed on#compactif there is no edit-user action to be found, the rendered output was 2 nested spans, which messed up layout.