From: Eric Michael Date: 2008-08-28T13:35:08+09:00 Subject: Help with Custom ERB Templates I'm trying to create a custom erb template that allows me to mix MXML and Ruby. I'm having problems coming from the way I wish to implement it. In MXML you need tags which I would like to use Ruby to create. Take note of the following MXML snippet: blah blah blah I would like to have an mxml/erb file create that in Ruby by doing something like the following: <% MX::Application.new{|app| app["xmlns:mx"]="http://www.adobe.com/2006/mxml" %> blah blah blah <% } %> In my current solution, ERB runs the Ruby code and generates the tag with the proper options but displays the non-ruby part afterwards such as this: blah blah blah Would there be any way to capture the "blah blah blah" as a string and somehow pass that to the underlying Ruby so it can be told when to print? I would really like for the curly-braces to signify the start and end of a tag. I suppose the functionality I'm trying to mimic is similar to form_tag in Rails <% form_tag '/posts' do -%>
<%= submit_tag 'Save' %>
<% end -%> Thanks -- Posted via http://www.ruby-forum.com/.