Yesterday I figured out how to avoid a pattern that we’ve been doing in a project for some time which is sending the current_user in components through parameters to validate things based on who is watching. Example: # index.html.erb render ProductsComponent.new(current_user: current_user, products: @products) # products_component.rb c...
#Ruby on Rails
Added: 16 Aug 2022