Tips Render Partial Rails 2.3
• Kunto Aji - Last modified atPada Rails 2.3, ada beberapa cara penulisan untuk melakukan render
sekaligus assign
sebuah variabel lokal.
# Contoh
# app/views/posts/new.html.erb
<%= render :partial => "input", :locals => {:myvar => 3} %>
Kode diatas dapat disingkat dan ditulis menjadi:
# Contoh
# app/views/posts/new.html.erb
<%= render "input", :myvar => 3 %>
# Contoh
# app/views/posts/_input.html.erb
<%= "My local variable: #{myvar}" %>
Recent Posts
KAK Labs Newsletter #6 - Staying Safe From Pegasus Spyware
Newsletter #6 - Pegasus, Ruby, PostgreSQL and networkQuality tool
Material Design - Paragraph Spacing
According to Google's Material Design, keep paragraph spacing in the range between .75x and 1.25x of the type size.
Amazon SDK for C# - S3 File Download Methods
Comparison between `TransferUtility.DownloadAsync`, `DownloadSingleFileAsync`, and `GetObjectAsync`.
Duplicate Content Detection with fdupes Command
Effortlessly locate duplicate files content in Linux using 'fdupes' command.
Broken Pipe Error
My note about Broken Pipe error