I’m using a compacted scriptaculous library instead of the default ones,
but it work fine… the problem was really with the spaces… fixing them
manually on firebug was making it work.
I realise now, my code should not of worked (unless @id is already a
string) so it should be @id.to_s… But this this not the issue
because your code shows the “comment-9”
Do you have javascript_include_tag :defaults ?
Here is my test (which works), otherwise use firefox and firebug to
debug
I haven’t still been able to figure out that problem… I ended up
working on some other things, hoping somebody would know the solution…
Well, at least I’m not the only one with the problem now. I’ll try to
trace the rails code to find out where this problem is being created.
I’ll post an update here if I find out anything.
Did you try using <%= -%> instead of <%= %> ? (the dash-percent-
greaterthan is supposed to not spit out an additional #\linefeed).
I tried your idea (sounded reasonable), but it still didn’t work. And
I’m slowly running out of other ideas. I think I’m gonna lay this thing
aside for some days and try it again in a week. Perhaps I got some fresh
ideas by then.
Nevertheless, thanks for your help! I let you know, as soon as I find
anything out.
I’m using a compacted scriptaculous library instead of the default ones,
but it work fine… the problem was really with the spaces… fixing them
manually on firebug was making it work.
Thanks a lot!
Eduardo
Hi there,
I have the exact same problem. I’m using a RJS for creating a new li
element. This happens with a partial.
As soon as I remove the line breaks, everything is executed just fine.
I’m sitting at this problem for some time now. The whole thing worked
for some time. I added a similar functionality to a different section on
my site and both stopped working. I double-checked everything and can’t
see any problems.
Did you solved the problem yet? Any suggestions or tips for my case?
thanks for the reply… Unfortunately, it’s still not working. I’m using
Actionpack-1.13.3.
I tried the “debug_rjs = false”, but I still get the exact same JS as
the output.
In regard to the previous post, about using <%= -%>, I’m not even using
those tags, I just have the page[‘a’].visual_effect command directly on
the RJS file.
Thanks a lot for the help so far, everybody…
Mark Reginald J. wrote:
Eduardo S. wrote:
try {
literal" error on the browser… If i remove them manually, it works
correctly.
There used to be a bug in the RJS JavaScript debugging code, but it
was fixed some time ago. Are you using actionpack-1.13.3?
Alternatively, turn off the debug code by adding
config.action_view.debug_rjs = false
inside the Rails::Initializer.run block in environment.rb.
–
We develop, watch us RoR, in numbers too big to ignore.
Just use a before_filter instead of an after_filter. The content-type
will only be set, whenever a template is rendered, which needs a
content-type. RJS templates will be ignored and rendered correctly.
Again, big thanks for posting the solution. Would have searched another
month for this…
Just use a before_filter instead of an after_filter. The content-type
will only be set, whenever a template is rendered, which needs a
content-type. RJS templates will be ignored and rendered correctly.
Again, big thanks for posting the solution. Would have searched another
month for this…
Bye
Axel
Eduardo S. wrote:
hi everybody,
just for the record, I ended up finding out what the problem was.
I had added a function to the application.rb to include headers on every
request to set the proper response content-type and content-language.
The problem is that those two things were being added to every
request, even JS ones. That was causing the problem.
After commenting out those two lines, everything is working again.
Thanks for everybody!
Eduardo
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.