prismicio / ruby-rails-starter

Starter project for Ruby on Rails – Works with any prismic.io repository
32 stars 21 forks source link

Writing link_resolver(@maybe_ref) faster in views #8

Closed rudyrigot closed 10 years ago

rudyrigot commented 10 years ago

Each time we use as_html in views (which is often), we write it like this: as_html(link_resolver(@maybe_ref)). 99% of the time, it is the same link_resolver, and the same @maybe_ref (actually, I can't see of any non-borderline case where it wouldn't be the case).

This allows to do as_html(lr).

I'm not sure it's a good idea, that's a lot of information lost in this way to write it; what do you think?

rudyrigot commented 10 years ago

This is not that useful.