Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # architecture_controller.rb
- def index
- respond_to do |format|
- format.html
- format.json {
- # resource_data will get all the architectures with `host_count` and `operating systems`
- render :json => {:results => resource_data()}
- }
- end
- end
- # views/architectures/index/html.erb
- <div id="architectures"></div>
- <%= mount_react_component("Architectures", "#architectures", results) %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement