I want to use divs that resize based on the presence of certain ruby variables.
How would I insert my size variable into a div like this
<% @width = 30 %>
<%= "<div id='inner_meal_pan_overview' width='100%' style=\"width:#{@width}em;\">" %>
I want to use divs that resize based on the presence of certain ruby variables.
How would I insert my size variable into a div like this
<% @width = 30 %>
<%= "<div id='inner_meal_pan_overview' width='100%' style=\"width:#{@width}em;\">" %>
How would I insert my size variable into a div like this
<% @width = 30 %>
<%= "<div id='inner_meal_pan_overview' width='100%' style=\"width:#{@width}em;\">" %>
that's not absolutely wrong, only those slashes are not necessary if you use single parentheses: <%= "<div id='inner_meal_pan_overview' width='100%' style='width:#{@width}em;'>" %>
or: <div id='inner_meal_pan_overview' width='100%' style='width:<%= @width %>em;'>
Also <% @width = 30 %> should really go in the controller action