-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: ruby: trying to pop an empty stack in rule #134
Comments
Anyone mind if I look at this? It looks interesting. (@alexandrudima @jrieken) |
PR welcome, although beware this is complicated. |
same here.
|
Add hbs alias to handlebars
I am getting a similar error for this ruby file (which looks legit to me) # frozen_string_literal: true
class BaseModelConfiguration
attr_reader :table_properties
attr_reader :signatures
attr_reader :links
attr_reader :form_fields
attr_reader :entity
attr_reader :model_name
attr_reader :edited_tabs
attr_reader :api_hash
attr_reader :cur_page
def initialize
@table_properties = []
@signatures = []
@links = []
@form_fields = []
@entity = nil
@model_name = nil
@edited_tabs = nil
@cur_page = nil
@api_hash = {}
construct
end
public def construct; end
def transform_params
out_params = ''
form_fields.each_with_index do |attr, index|
backurl_cond = attr[:caption][:class] != 'backurl'
entity_file_cond = attr[:block][:name] != 'field_for_model/file'
hidden_field = !attr[:block][:content][:permit_hidden]
view_text = (attr[:block][:name] == 'field_for_model/input' && attr[:block][:view] == 'text')
sep_cond = (index != 0) && entity_file_cond && hidden_field && backurl_cond && !view_text && out_params != ''
sep = if sep_cond
', '
else
''
end
out_params = "#{sep}:#{attr[:block][:content][:value]}" if entity_file_cond && hidden_field && backurl_cond && !view_text
end
"params.require(:#{@model_name}).permit(#{out_params})"
end
end
|
any workarounds for this? this issue is still present |
Maybe I'm missing something? The original example isn't valid ruby - the text at the first lines isn't commented and there's an extra It seems the problem has to do with consecutive |
ruby
modelPlayground link:
https://microsoft.github.io/monaco-editor/playground.html?source=v0.36.0-dev.20230224#XQAAAAKsAwAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscw4l5XSjQNeA7FQlbpOv2DA3EMY8CYQ3CFqhMFQnNbwxh6oNnQu4zdOiVyZGIB-vxwfpQbbeL25j50ItdHT-fQwzmNrusFBv0v9iXe5FWKDdzF8qMWVilBieAxIj4YzEs2HvBWFa6oHrPfbFjcfukVP7Y67jQn7LR_78a0e5lCiJ4f0jt-ZfrCbQVBQx7p-rHH-01ebDeFknzHKwwPo1YSMk7mUwuhixaQ3Jxn2h39O8zbDkTDADlUx5vni1MWpdhr0ycH36ylOun0HyTXX2WiY9-fUjcEm_4jYcBQG0Mek-78kaAHK--3TjOSfxeSxy13tgflHn1b5iO--GLIKgJ6YiUsPWGq-hEpK3wWTHasBaWjhmZACQjceGdbzyzIa9_Ri01WzmgBwuAojyHSNACyOtGUrpuUpCy4R10K3aBBTYjBfgANlYcM1yYvaw5RMxNmI9PJBp_rKMUXikHmHMWDQggW3AtRM34-_6k-Zu8dMGCywbowkcnsX_PElAHJvBSib_iCWLzTvp_dSrwy73f6Ymr_gavT2Q
The text was updated successfully, but these errors were encountered: