Closed
Description
First of all - @joelhawksley Thank you! The missing part of Rails I was googling so badly 😄
I have an idea about templates - instead of defining it as a method with heredoc, use the same approach as Sinatra's inline templates can be better
https://github.com/sinatra/sinatra#inline-templates
as, for example, we can define styles in the same place like:
class OurComponent
def hello_message
"Hello, world!"
end
...
end
__END__
@@template
<div class="title"><%= hello_message %></div>
@@styles
.title {
font-size: 24px;
}
Related code from Sinatra repo can be found here
Metadata
Metadata
Assignees
Labels
No labels