-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use layout.build instead of layout.new #432
base: master
Are you sure you want to change the base?
Conversation
That's brilliant! But no test? 😭 |
@apotonick should i place it in builder_test or in layout_test? |
@JelF Thanks, into layout test, please. @timoschilling what do you think about this? |
@apotonick There is no performance Problem, if you mean this? If the cell don't include |
✋ <-- :highfive: |
1ea5067
to
bbe8eec
Compare
|
||
it 'renders special layout if requested' do | ||
Comment::ShowCell.new(nil, layout: Comment::LayoutCell, context: { special_layout: true }). | ||
().must_equal "$layout.erb{Comment::SpecialLayoutCell, $show.erb, {:special_layout=>true} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't sure it's the best way to handle multiline strings. Should i better use heredoc and gsub extra spaces?
in Cell::ViewModel::Layout::External. Reason: allow layout class to be selected using context. I.e. builds { |_, context:, **| self::Mobile if context[:mobile] }
Use layout.build instead of layout.new in Cell::ViewModel::Layout::External.
Reason: allow layout class to be selected using context.
I.e. builds { |_, context:, **| self::Mobile if context[:mobile] }