rails/prototype-rails

rjs file content displaying in UI

NeelaveniT opened this issue · 1 comments

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

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 .