>
> How many "if"s? How many "end"s? See the problem?
>
> Seriously, you need to work through a tutorial, as suggested earlier,
> rather than expect the members of this forum to write your code one
> statement at a time.
>
Sorry and thanks! I did go through the tutorial and edit my code as
this:
Land Area: <%= land_area %>
<%- if land_area_unit == 'M2' %>m²
<%- elseif land_area_unit == 'HA' %>Ha
<%- elseif land_area_unit == 'AC' %>Ac
<%- else %>sq feet<%- end %>
but the result is all showing sq feet, any idea, sorry I don't know
where else I can work it out.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9eff4631fa91debe0ef9aa78cc61803b%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment