Ask A Question

Notifications

You’re not receiving notifications from this thread.

My html.erb view is not being loaded with style, after ajax submission.

Doctuh asked in Rails

0

I have created a partial that gets rendered on my index page, via AJAX. This works flawless. However when I access the route, that i also want the rendered partial to show up on, it renders with no styling, as plain HTML. I have made a video that shows it pretty well. Pay notice when I access my route /accounts/euw. This is where it renders it as plain HTML, which I dont wan't, I want it to be rendered like the AJAX, with all style in-tact. What am I doing wrong??

My controller:
´´´
def euw
@euw_products = Server.find(1).products
respond_to do |format|
format.js { render partial: 'accounts/euw_result' }
format.html { render partial: 'accounts/euw'}
end
end
´´´
https://www.youtube.com/watch?v=HyP7S2qJ7OI&feature=youtu.be

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 87,677+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.