<% 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.
author | raymonjohnstone |
---|---|
permlink | checking-if-a-property-is-present-in-ruby-on-rails |
category | developer |
json_metadata | {"tags":["developer","programming","rubyonrails"],"app":"steemit/0.1","format":"markdown"} |
created | 2016-12-18 19:15:57 |
last_update | 2016-12-18 19:15:57 |
depth | 0 |
children | 0 |
last_payout | 2017-01-18 21:56:03 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.029 HBD |
curator_payout_value | 0.009 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 272 |
author_reputation | 14,645,589,333,318 |
root_title | "Checking if a property is present in ruby on rails" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 0 |
post_id | 2,035,294 |
net_rshares | 958,276,452,227 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
abit | 0 | 612,763,098,943 | 1% | ||
boy | 0 | 3,800,461,746 | 100% | ||
bue-witness | 0 | 4,625,617,487 | 100% | ||
bunny | 0 | 715,412,324 | 100% | ||
bue | 0 | 72,162,020,652 | 100% | ||
mini | 0 | 2,034,286,246 | 100% | ||
moon | 0 | 259,373,949 | 100% | ||
healthcare | 0 | 761,985,317 | 100% | ||
daniel.pan | 0 | 1,202,409,031 | 100% | ||
helen.tan | 0 | 350,295,430 | 100% | ||
murh | 0 | 1,502,864,744 | 11% | ||
applecrisp | 0 | 1,126,448,432 | 20% | ||
fyrstikken | 0 | 237,546,427,470 | 10% | ||
thegoodguy | 0 | 5,182,383,510 | 100% | ||
raymonjohnstone | 0 | 6,872,236,141 | 100% | ||
craigslist | 0 | 517,036,634 | 100% | ||
analyzethis | 0 | 54,223,699 | 100% | ||
roadhog | 0 | 53,990,613 | 100% | ||
doggnostic | 0 | 53,899,442 | 100% | ||
jenny-talls | 0 | 53,620,891 | 100% | ||
post-successful | 0 | 53,415,391 | 100% | ||
breezin | 0 | 3,793,790,095 | 47% | ||
montreal32 | 0 | 2,791,154,040 | 100% |