Class: Pwb::ConfigController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/pwb/config_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



7
8
9
# File 'app/controllers/pwb/config_controller.rb', line 7

def show
  render 'pwb/config/show'
end

#show_clientObject



11
12
13
14
15
16
17
18
19
20
# File 'app/controllers/pwb/config_controller.rb', line 11

def show_client
  fb_instance_id = Rails.application.secrets.fb_instance_id
  base_uri = "https://#{fb_instance_id}.firebaseio.com/"
  firebase = Firebase::Client.new(base_uri)
  @client_key = params["client_id"]
  response = firebase.get("props/" + @client_key )

  @props_hash = response.body
  render 'pwb/config/show_client'
end