Quantcast
Channel: Opinion: Shopify Community - Shopify APIs & SDKs
Viewing all articles
Browse latest Browse all 25503

How to Render a Ruby on Rails Form in an App Proxy Page by Neil Charlton

$
0
0

I have a ruby on rails app that has a form in it. Its all working fine locally however I want to make it an app proxy page which involves adding this

    render :layout => false, :content_type => 'application/liquid' if Rails.env.production?

which allows the app proxy page to load it into the Shopify environment.

My controller action looks like this

def new
    render :layout => false, :content_type => 'application/liquid' if Rails.env.production?
    @product = Product.new
  end

This however means that my normal erb templates (containing the form) wont parse properly.

Please can someone tell me the correct way to load the normal erb templates into the liquid parser ?

I have gem 'liquid' in my Gemfile.

What am I missing here?

 

 


Viewing all articles
Browse latest Browse all 25503

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>