What I'm trying to do:
For every view file (e.g. new.html.haml), include a file with this
pattern: <action_name>.js. So, in the example of new.html.haml, I'd
like to automatically try to include the file new.js.
Further, I'd like to be able to evaluate Ruby code in the JS. A silly
example:
alert( #{ user.name } );
I've tried a few things. At this point, it seems like maybe creating a
partial is the easiest, but I wonder if there's a cleaner way someone
can think of?
Molto grati
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.