Question

I'm using rhoMobile platform I'm trying to get a parameter in my erb file from rb file. I have a properties file, in my app.rb file i'm getting values from keys in this properties file. This value is saved in application.rb, and i want to use this value in my app.erb. Here is some code:

myFunc(<%= Rho::RhoConfig.getValue %>)
Was it helpful?

Solution 2

myFunc('<%= Rho.get_app.getValue('key')%>')

OTHER TIPS

I am not going to question if your doing things right, but this should work:

myFunc("<%= Rho::RhoConfig.getValue %>")

Try this:

<script type="text/javascript" charset="utf-8">
  var rho_config_value = <%= Rho::RhoConfig.getValue || 'null' %>;
  myFunc(rho_config_value)
</script>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top