Comments (8)
My 2 cents, tobi
Generally I agree with your argument. Furthermore, I assume that most people would use Liquid by hand in their controllers, not exactly as an ActionView Template Handler (eg erb or haml)
If that's your line of thought then I think you are right. However, since changing that would effectively be a breaking change I believe it should be part of a larger liquid 3.0.0 roadmap.
Finally, assuming I got your point right, I think that removing init itself might not be the necessary. Just the handler part, leaving it to require liquid lib only.
Best regards,
DBA
from liquid.
yes this is what I have in mind. Great to have your +1.
from liquid.
You guys at shopify have something in mind for liquid 3.0? :)
from liquid.
Got liquid 3 party started at: http://groups.google.com/group/liquid-templates/browse_thread/thread/d6c13a75a3768b18
Hope people participate with their inputs ;)
from liquid.
That seems like a heavy handed approach for what sounds like essentially an education issue. I've found liquid to be a great addition to a few different rails projects, precisely because of it's intended purpose. No, it's not a general purpose replacement for erb, nor does it seem to be presented as one. But just because I have some developer/designer crafted pages in a project doesn't automatically mean I want to prevent end users from creating content. Conversely, having end user created content doesn't necessarily mean I have no use for developer designed templates.
There are plenty of template languages available that work with rails, but none of the others that I've run across are designed to be exposed to a wider audience (and survive). Whether or not it plugs into ActionView in precisely the same way as the general purpose templates is just an implementation detail. But losing (or at least significantly complicating) liquid template use in a rails site would be a very sad direction for liquid to go.
from liquid.
I'm in the same situation as being described in this thread -- using liquid in a "hostile" environment (multi-tenant rails app, where the tenants can change views). The Liquid templates themselves are stored in the DB, and I was investigating whether writing a custom template resolver (to fetch the template from the DB) and a custom template handler (to actually render the liquid template) makes sense.
@tobi -- in your post above, you feel having a template liquid handler does not make sense. Would it be possible for you to explain why? It might not be obvious to someone (me, in this case!) who is tackling this problem for the first time.
from liquid.
Spend the last hour looking at ActionView::Template
Is the reason why Liquid templates and Rails templates handlers don't mix well because Rails compiles the template into actual Ruby code which is then evaled in the same process/memory-space as the app. This is precisely what Liquid is trying to avoid -- any sort of code injection into the host app.
from liquid.
is there more in terms of dependencies to rails despite the init.rb
and the usage of ActionView::Helpers::TagHelper
?
i think that nowadays it's more common to install gems instead of using rails plugins. so i think that removing the rails stuff would be fine. if anyone want's to have it, you could go for a liquid-rails.gem like it's done with many other template languages.
from liquid.
Related Issues (20)
- Fix Wiki reference
- Custom Liquid::Drop that is called for every missing variable HOT 1
- Possible to get full object & variable name with `strict_variables: true`?
- video_tag fully disable poster HOT 2
- Expose Liquid::Condition in public API
- alt attribute not set for media.preview_image with image_tag filter HOT 1
- Running rake example throws error
- Liquid rendering is unexpectedly changing the "context" attribute on non-Drop classes
- Liquid shopify skórki
- Add WISMOlabs to "Who uses Liquid?" wiki section
- App Block Missing Data On Theme Previews When Proceeded by a Hidden Section Containing an @app Block
- Sort orders by 'created_at' in paginate?
- Regarding deprecation of the total_discount
- Add limit to split filter, like split method in Ruby
- Liquid - Product Description Null Check Not Working
- Should strip_newlines also 'strip' LSEP ?
- Case statement evaluation renders multiple when conditions if a value is repeated
- String to Object? HOT 1
- ع
- Can't get key/value from hash
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from liquid.