• Login
sketchucation logo sketchucation
  • Login
⚠️ Attention | Having issues with Sketchucation Tools 5? Report Here

Wrapping HTML in ruby, why?

Scheduled Pinned Locked Moved Developers' Forum
3 Posts 2 Posters 66 Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    jolran
    last edited by 20 Nov 2012, 17:52

    Hello!

    I haven't been programming for a while. Now I have been going through some other people's scripts for inspiration and education purposes.

    I notice several scripts is putting the HTML in the rubyscript.
    And a few topics on this forum seems also to favour this behavior.
    Doing some searching on this forum I get the impression it has to do with set.file problems for Safari?

    I guess the question is, since I have been putting the JS, Jquery and HTML in separate files and folders will I benefit rewriting the HTML in the rb.file?

    I rather keep things like I have it right now, but if it's proven I will run into trouble later on I rather change it right away.
    I do realize there is one short and one long answer to this question, and I'll appreciate any advice I'll get.

    Thanks/ Joel.

    1 Reply Last reply Reply Quote 0
    • A Offline
      Aerilius
      last edited by 20 Nov 2012, 18:24

      I think as far as I remember there were issues with set_html (driven maybe knows more exactly what the issues were).
      If you have jQuery (+ other files...) it is certainly not a good idea to embed it inside ruby (it makes the ruby file long and ugly to read). If you just want a small single-file-plugin with very simple html, than it can be convenient to put it into the rb.

      1 Reply Last reply Reply Quote 0
      • J Offline
        jolran
        last edited by 20 Nov 2012, 18:42

        Aha, I see. So embedding HTML is more for convenience sake then.
        I remember even over half a year ago there where issues on Safari, thought they whould have been fixed by now.

        Kind of the answer I was hoping for though, if I understood it correctly.

        Thank you.

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        1 / 1
        • First post
          2/3
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement