Last active
August 29, 2015 14:15
-
-
Save adampats/fe5543dacea8aae24b7d to your computer and use it in GitHub Desktop.
rails hashes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@myvariable data: | |
[{"id"=>"00006-testing-test_00", | |
"key"=>"00006", | |
"value"=> | |
{"_id"=>"00006-testing-test_00", | |
"_rev"=>"1-217c469e142fab5adbd334540b0246da", | |
"ApplicationName"=>"testing", | |
"Environment"=>"test", | |
"EnvironmentDescription"=>"test", | |
"FUID"=>"00006", | |
"NetworkZone"=>"06", | |
"DataClass"=>"03"}}] | |
view: | |
<% @myvariable.sort.each do |variable| %> | |
<div class="row no-gutter"> | |
<h3>My Variables</h3> | |
</div> | |
<div class="portlet-inner"> | |
<table class="table table-bordered table-condensed"> | |
<tr> | |
<th> | |
Name | |
</th> | |
<th> | |
Environment | |
</th> | |
</tr> | |
<% binding.pry %> | |
<% variable.each do |key,item| %> | |
<tr> | |
<td> | |
<%= item['_id'] %> | |
</td> | |
<td> | |
<%= item['Environment'] %> | |
</td> | |
</tr> | |
<% end %> | |
</table> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment