Sha256: 953307bb293b977c0f95d27892b91f882ccf7b1c220754d7b1279bce723ce404
Contents?: true
Size: 709 Bytes
Versions: 7
Compression:
Stored size: 709 Bytes
Contents
require 'front_end_builds/routing_constraints/html_routing_constraint' module ActionDispatch::Routing class Mapper # Create a front end in your rails router. def front_end(name, path = name, options = {}) # Create a new build for this app. post( "#{path}" => "front_end_builds/builds#create", defaults: { app_name: name } ) # Get a build for this app. constraints FrontEndBuilds::HtmlRoutingConstraint.new do get( "/#{path}/(*path)" => "front_end_builds/builds#index", defaults: { branch: 'master', app_name: name }.merge(options) ) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems