#rubyonrails - Sat 17 Mar 2007 between 00:00 and 00:24

NY Lost Funds



douglas-anyone ever setup simple ticket before?
motiondidnt you ask that question
5 minutes ago
douglas-yup I think I did, just asking it for any new people joined
I'm having some problems with it, I'm not sure if I'm just stupid or its crappy coding or both
sigh
motiondouglas-: so ask about your problem . stop being generic
its like asking if anyone has used windows expecting them to be able to fix some random thing thats broken :(
douglas-ok give me a second to gather my thoughts.
mediumwaredoes link_to_remote submit as post by default?
Palishgah, damnit
Rails is looking for an .rjs file. I'm trying to send a .js file.
even though I have respond_to do { |format| format.html format.js }
mediumwareI had to explicitly specify :submit => :get for it not to post
PalishCan I have just plain javascript in rjs templates?
theRemixis there a helper method/option to link_to :back ?
Palishgr.
anonuserPalish, doesn't work that way
You'll probably want to generate the javascript with rjs
PalishNo thanks, I'd like to stick with javascript :)
anonuseror you can parse it yourself.
PalishI'm trying to figure out how to respond to .js requests with plain old javascript
anonuserrjs is ruby generated javascript.
Palishyes, and I want to stick with plain old javascript ;)
anonuserokay
PalishI'm just more comfortable with that than learning the rjs language.
so somehow I need to trick rails into responding to format.js requests with the .js file
joelmichaelit's not a whole new language, just a fairly small set of methods you can use to simplify common tasks
Palishand -not- the rjs file
joelmichael: unfortunately my tasks are very complex. I have to make use of my existing library of javascript functions.
anonuserPalish, render => :text => "javascript goes here"
Palishconstructing tree views.. stuff like that
joelmichaelwell then, by all means :)
Palishthe problem is, I'm trying to figure out how to have two files -- show.rhtml, and show.js. Then when someone requests /assignments/2.js, it responds with show.js
joelmichaelthe main use of rjs for me has been when i want to update multiple elements after an ajax call
Palishthe problem comes from the fact that ruby says "format .js? Oh, he must want rjs. I'll look for rjs."
which is fine..but in my case I wish it would just respond with the plain .js file
anonuserPalish, you could render something yourself?
joelmichaelPalish: you could put the function in your .js file which is included in the layout, then just have it render :text => "myfunction()" or something.
Palishthe idea is to define the function in show.js

Page: 2 9 16 23 30 37 44 51 58 65 72 79 

IrcArchive

NY Lost Funds