This way we remove the duplication in the layouts which had these links. Since we're now passing the `current_user` option to partials in all cases, IMHO the code is easier to follow if we use the `Layout::NotificationItemComponent` instead of its partial.
8 lines
129 B
Ruby
8 lines
129 B
Ruby
class Layout::AccountMenuComponent < ApplicationComponent
|
|
attr_reader :user
|
|
|
|
def initialize(user)
|
|
@user = user
|
|
end
|
|
end
|