Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rjs file content displaying in UI #41

Closed
NeelaveniT opened this issue Feb 20, 2017 · 1 comment
Closed

rjs file content displaying in UI #41

NeelaveniT opened this issue Feb 20, 2017 · 1 comment

Comments

@NeelaveniT
Copy link

Hi,
I am migrating rails 2.3.8 to rails 4.2.7,on that we have used the rjs file for loading ajax,flash,etc as the common.rjs
In rails 4.2.7 rjs format is not supported,to support those I have use the gem in Gemfile as follow
gem 'prototype-rails', github: 'rails/prototype-rails', branch: '4.2'
I use bundle install to install the gem.
Add I have included the following line in app/assets/javascript/application.js
//= require prototype
//= require prototype_ujs
//= require effects
//= require dragdrop
//= require controls

After I tried to load the application,but it shows the content of common.rjs file in UI. The content is below

#page['ajax-indicator'].set_style :display => ''
data = @DaTa || :data
output = @output || :output
#page.alert(page[:subject_form])
#page[:subject_form].reset()
if @successful
page[data].replace_html :partial => @partial_render
page[output].replace_html flash_messages
else
if(flash[:notice] or flash[:error])
page[output].replace_html flash_messages
else
page[output].replace_html error_messages_for @model
end
end

page.visual_effect :fade, 'ajax-indicator'
#page['ajax-indicator'].set_style :display => 'none'

Kindly help to fix this issue

@NeelaveniT NeelaveniT changed the title rjs content is loaded rjs file content displaying in UI Feb 20, 2017
@NeelaveniT NeelaveniT reopened this Feb 20, 2017
@NeelaveniT
Copy link
Author

Hi,
Instead of render the rjs file,I have render another file which have same content with js.erb format
So its display the content of that file.
Now the rjs file processed successfully to me.
Thank you .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant