create account

Checking if a property is present in ruby on rails by raymonjohnstone

View this thread on: hive.blogpeakd.comecency.com
· @raymonjohnstone ·
$0.04
Checking if a property is present in ruby on rails
<% if !current_user.steemaccount.present? %>
do something if it is not present ! asking if not
 <% else %>
do something if it is present.
 <% end %>

the inverse of our if statement would also be <% if current_user.steemaccount.present? %>

I hope this helps someone else.
👍  , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorraymonjohnstone
permlinkchecking-if-a-property-is-present-in-ruby-on-rails
categorydeveloper
json_metadata{"tags":["developer","programming","rubyonrails"],"app":"steemit/0.1","format":"markdown"}
created2016-12-18 19:15:57
last_update2016-12-18 19:15:57
depth0
children0
last_payout2017-01-18 21:56:03
cashout_time1969-12-31 23:59:59
total_payout_value0.029 HBD
curator_payout_value0.009 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length272
author_reputation14,645,589,333,318
root_title"Checking if a property is present in ruby on rails"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id2,035,294
net_rshares958,276,452,227
author_curate_reward""
vote details (23)