Coder Social home page Coder Social logo

Comments (9)

iox avatar iox commented on June 23, 2024

Hi Don,

I have spent some time trying to debug this, bit I haven't found the solution yet. Somehow the Dryml template engine does not enjoy using partial files.

Before spending more time on this, I wanted to ask you if you have tried this approach for Dryml partials:

partial.dryml:

<def tag="partial">
  <h1>This is a partial</h1>
</def>

index.dryml

<include src="partial"/>
<partial/>

This is useful to split large Dryml files, but I don't know if it will cover your needs. What do you think?

from hobo.

iox avatar iox commented on June 23, 2024

More references to a similar partial issue: https://groups.google.com/forum/#!topic/hobousers/2zv9LxpzDJI

from hobo.

dziesig avatar dziesig commented on June 23, 2024

Hi Ignatio,

It took me a long time to get back to the partial problem. Most of my
partials are used to keep the dryml files at a managable size, so I
tried your suggestion and it works fine (for all of the places where I
have made the change).

Now I can translate all the remaining html files I had to use so that I
could use partials back to dryml.

Thanks for the hint.

Don

Hi Don,

I have spent some time trying to debug this, bit I haven't found the
solution yet. Somehow the Dryml template engine does not enjoy using
partial files.

Before spending more time on this, I wanted to ask you if you have tried
this approach for Dryml partials:

partial.dryml:

|

This is a partial

|

index.dryml

|

|

This is useful to split large Dryml files, but I don't know if it will
cover your needs. What do you think?

from hobo.

iox avatar iox commented on June 23, 2024

I'm glad the workaround is useful for you Don.

I'm going to leave this open as low priority, without a milestone set.

from hobo.

dziesig avatar dziesig commented on June 23, 2024

Hi Ignacio,

Well, I hit the bug again, this time indirectly. I just added the
following code to index.dryml (enclosed in <script></script> and after a
javascript function that loads a google map (successfully)).

When 0 < mode > 3 (i.e. no partials are rendered) the code works fine.
If mode is set so one of the partials is rendered, it crashes the second
time the page is rendered (just like before).

There is another path in the program that reaches the same javascript
code via ajax (without hitting dryml) which works correctly.

Back to the drawing board :-( .

Don Ziesig

On 03/20/2014 05:36 AM, Ignacio Huerta wrote:

I'm glad the workaround is useful for you Don.

I'm going to leave this open as low priority, without a milestone set.


Reply to this email directly or view it on GitHub
#50 (comment).

from hobo.

iox avatar iox commented on June 23, 2024

Hi Don,

I'm afraid that Github removed the code from your comment, so I can't reproduce it. Could you try again pasting it directly through the Github interface? (#50 (comment))

In this link you can see how to format "fenced code blocks": https://help.github.com/articles/github-flavored-markdown.

Alternatively, just email the code to my personal email :).

Regards,
Ignacio

from hobo.

iox avatar iox commented on June 23, 2024

Moving up in priority: we should be able to fix this!

from hobo.

owendall avatar owendall commented on June 23, 2024

Thanks for that, Ignacio.
On Jan 3, 2014 1:18 PM, "Ignacio Huerta" [email protected] wrote:

Hi Don,

I have spent some time trying to debug this, bit I haven't found the
solution yet. Somehow the Dryml template engine does not enjoy using
partial files.

Before spending more time on this, I wanted to ask you if you have tried
this approach for Dryml partials:

partial.dryml:

This is a partial

index.dryml

This is useful to split large Dryml files, but I don't know if it will
cover your needs. What do you think?


Reply to this email directly or view it on GitHubhttps://github.com//issues/50#issuecomment-31541903
.

from hobo.

enwood avatar enwood commented on June 23, 2024

Hi Ignacio. I, too, seem to have hit this very issue in Hobo 2.0.1. On a re-render (or refresh) of a DRYML page that calls a partial, I get the same crash. First time through is perfect.

  <content-body:>
        ...
        <%= render :partial => '/packages/payments', :locals => { :package => @package } %> 
        ...
  </content-body:>
</submit-page>

NoMethodError - undefined method _app_views_packages__payments_erb__2530908954951846704_70312386648420' for #<#Class:0x007fe5bbd072c8:0x007fe5c1f0b258>:
() Users/tgriffin/.rvm/gems/ruby-1.9.3-p545/bundler/gems/hobo-cda5c09aafa8/dryml/lib/dryml/template_environment.rb:642:in method_missing'
actionpack (3.2.12) lib/action_view/template.rb:145:in `block in render'

from hobo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.