Run Ruby code on page change

(SMHassanAlavi) #1

I want to write a pluggin with ruby and I Have a code to run on each page change.
I have read :

completely all parts
but there wasn’t any content about where to put ruby code on plugin and what should I do for running code on page change?
I khow soloution for javascript in plugin but I know nothing about ruby in plugin .
what should I do and which refrence should I read?

(Pad Pors) #2

so far all the plugins I’ve seen are as the form of a plugin.rb file which is put in the main folder of the plugin.

are you looking for a way to test your plugin or what?

(SMHassanAlavi) #3

so I need a complete document of discourse object and I want to apply my code in any page can I do it?