You can now put headers inside the manifest :
CACHE MANIFEST
#////////////////////////
# Max-Validity: 2 Weeks and 5 Hours
# Check-Update-Every: 60 Minutes
# Update-Style: Immediate
# On-Update: reload
RSpec.feature 'Post react component test' do | |
before(:each) do | |
post_json(render_component_path, { | |
component: 'Post', | |
props: { title: title } | |
}.to_json) | |
end | |
context 'with a title' do | |
let(:title) { 'Hello World' } |
<%= react_component(“Post”, {title: “Hello World”}, {camelize_props: true}) %> |
<div data-react-class="Post" data-react-props="{"title":"Hello World"}"></div> |
class RenderComponentsController < ActionController::Base | |
def create | |
render component: params[:component], props: params[:props] | |
end | |
end |
Error in crecto_test.rb:28: instantiating 'Repo:Module#all(Post.class)' | |
Repo.all Post | |
^~~ | |
in lib/crecto/src/crecto/repo.cr:76: instantiating 'add_preloads(Array(Post), Post.class, Array(NamedTuple(symbol: Symbol, query: Crecto::Repo::Query | Nil)))' | |
add_preloads(results, queryable, preloads) | |
^~~~~~~~~~~~ |
require('fattable/fattable.js'); | |
/* | |
* This variable is used to keep the scroll position when the live view navigation changes. | |
* This is useful for modals. | |
*/ | |
let keepScroll = {}; | |
export default { |
require "json" | |
class RouteJSON | |
JSON.mapping({ | |
verb: String, | |
controller: String, | |
action: String, | |
pipeline: String, | |
scope: String, | |
uri_pattern: String, |