Advertisement
Guest User

Untitled

a guest
Jun 19th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rails 0.43 KB | None | 0 0
  1. # architecture_controller.rb
  2.   def index
  3.     respond_to do |format|
  4.       format.html
  5.       format.json {
  6.         # resource_data will get all the architectures with `host_count` and `operating systems`
  7.         render :json => {:results => resource_data()}
  8.       }
  9.     end
  10.   end
  11.  
  12.  
  13. # views/architectures/index/html.erb
  14. <div id="architectures"></div>
  15. <%= mount_react_component("Architectures", "#architectures", results) %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement