I am trying to render the html generated by the erb's (embedded ruby) throught the react.render method. Can we use the erb's to feed the html generated by them to the react.render method? E.g. can I somehow inject this piece of code, for pagination by kaminari gem <%= paginate admins, :remote => true %>
to some react class like below?
#app/assets/javascripts/components/adminerror.js.coffee.erb
@AdminError = React.createClass
getDefaultProps: ->
errorText: ""
render: ->
dom.div
className: 'help-block has-error'
@props.errorText
<%= paginate @state.admins, :remote => true %>
Aucun commentaire:
Enregistrer un commentaire