File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
hyper-model/lib/reactive_record/active_record Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,8 @@ def find_inverse(model) # private
182182
183183 def klass ( model = nil )
184184 @klass ||= Object . const_get ( @klass_name ) if @klass_name
185- if @klass && model && !( model . class <= @klass )
185+ if @klass && model && !( model . class <= @klass || @klass <= model . class )
186+ # TODO: added || @klass <= model.class can both cases really happen I guess so
186187 raise "internal error: provided model #{ model } is not subclass of #{ @klass } "
187188 end
188189 raise 'no model supplied for polymorphic relationship' unless @klass || model
Original file line number Diff line number Diff line change @@ -3,5 +3,5 @@ if ((typeof(window) !== 'undefined') && (window.Hyperstack==undefined || window.
33}
44//if (typeof(Hyperstack) === 'undefined') { Hyperstack = {} }
55Hyperstack . hotloader . port = < %= Hyperstack . hotloader_port % >
6- Hyperstack . hotloader . ping = < %= ! ! Hyperstack . hotloader_ping % >
6+ Hyperstack . hotloader . ping = < %= Hyperstack . hotloader_ping ? Hyperstack . hotloader_ping : false % >
77Hyperstack . hotloader . ignore_callback_mapping = < %= ! ( ! Hyperstack . hotloader_ignore_callback_mapping && Rails . configuration . assets . debug ) % >
Original file line number Diff line number Diff line change @@ -4,6 +4,6 @@ if (typeof window !== 'undefined') {
44 Opal . Hyperstack . $const_get ( 'Hotloader' ) . $listen ( port || 25222 , ping || Opal . nil )
55 }
66 }
7- } else {
7+ } /* else {
88 throw 'Attempt to run hotloader during prerendering - make sure you import with the `client_only: true` option'
9- }
9+ } */
You can’t perform that action at this time.
0 commit comments