An example on how turbo_stream is rendered:
= turbo_stream.append :messages, @message
Where :messsages is the target and @message renders the partial _message.html.haml. Then it is rendered to:
// This div will be append to element with id="messages"
7 possible Actions
def create
@message = Message.find(....)
respond_to do |format|
format.turbo_stream # renders template in: create.turbo_stream.haml
format.html { redirect_to messages_url }
end
end
Reusing server side templates inline:
format.turbo_stream do
render turbo_stream: turbo_stream.append(:messages,
partial: "messages/message", locals: { message: @message})
end
Both "partial:" and "locals:" can be replaced by @message (Great Rails code!!!).
You need to install Metamask as an extension in your Chrome browser. After that, create a wallet address and change to Ropsten Test Network.
Now go to buy ETH and get it from a Test faucet. Then you can play with it by creating another account and sending ETH between them.
Here the big thing is the TRANSACTION SIGNATURE, how knows the Network that you are really the owner of this transaction? Because of Asymmetric signature, you will sign the transaction with your Private Key, so the node knows you are, because it decrypt with your Public Key. Metamask do all of it for you, also saves your private key.
Now you have ETH to test your wallet, you will code with SOLIDITY.
Enjoy your learning!!