Is it possible to pass in the value of a variable prior to it being passed to a helper method in Rails.
For example, I have a base64_encode helper method the @base_url is just being passed in a string literal instead of being evaluated.
<%= base64_encode(#{@base_url} + '/helloworld.html') %>
"#{ variable }"is variable interpolation in a ruby string. So you have at least two options for building your string.Note that you need to use
""for Ruby string interpolation instead of''.Kansas City on Rails has a short blog post to see in a glance how string interplation can look like.