AegisSailor
05-14-2006, 01:17 PM
Hi gang,
I've got this bit of code in a RHTML file to output all fields in the database table as edit in place fields:
<% for column in User.content_columns %>
<p>
<b><%= column.human_name %>:</b>
<%= in_place_editor_field :user, column.name, {}, :rows => 10 %>
</p>
<% end %>
That's farily straight forward. The problem is I need a way to skip the password field. That is, I don't want the password shown on the page. (It's encrypted and so gets edited via another method.)
I cannot find a single example of conditional Ruby code that looks for values that are not equal. In visual basic, I might do something like this:
Do while column.human_name <> "password"
How do I accomplish this in Ruby?
Thanks!
I've got this bit of code in a RHTML file to output all fields in the database table as edit in place fields:
<% for column in User.content_columns %>
<p>
<b><%= column.human_name %>:</b>
<%= in_place_editor_field :user, column.name, {}, :rows => 10 %>
</p>
<% end %>
That's farily straight forward. The problem is I need a way to skip the password field. That is, I don't want the password shown on the page. (It's encrypted and so gets edited via another method.)
I cannot find a single example of conditional Ruby code that looks for values that are not equal. In visual basic, I might do something like this:
Do while column.human_name <> "password"
How do I accomplish this in Ruby?
Thanks!