I ran into one problem that I cannot solve on my own for a week - I am desperate.
I got a Rails 5.2 project that has a Trailblazer on board. In one place of the application, I catch this error:
TypeError - no implicit conversion of Symbol into Hash:
app/concepts/post/admin/views/_authors_tab.slim:10:in `block (2 levels) in singleton class'
app/concepts/post/admin/views/_authors_tab.slim:9:in `block in singleton class'
app/concepts/post/admin/views/_authors_tab.slim:65534:in `singleton class'
app/concepts/post/admin/views/_authors_tab.slim:65531:in `__tilt_70096639860360'
app/concepts/post/admin/views/show.slim:14:in `block in singleton class'
app/concepts/post/admin/views/show.slim:65534:in `singleton class'
app/concepts/post/admin/views/show.slim:65531:in `__tilt_70096639860360'
app/concepts/post/admin/cell.rb:13:in `show'
app/views/admin/posts/show.slim:3:in `_app_views_admin_posts_show_slim__1322321696587881215_70096664842560'
app/controllers/application_controller.rb:71:in `apply_time_zone'
Started POST "/__better_errors/51d28299c14c669d/variables" for ::1 at 2018-10-22 15:00:18 +0300
_authors_tab.slim:10 (9 and 10 lines):
- authors.each do |author|
= concept 'post/author/list_item/cell', author, context: :admin
Below is the code that I specifically cut for the best presentation (the error, of course, was preserved):
class Post::Author::ListItem::Cell < RBlog::Cell
option_property :context, nil_check: true
def show
render
end
end
This is a file (app/concepts/r_blog/cell/option_property.rb) with a description of an unknown method:
module RBlor::Cell::OptionProperty
def option_property(name, nil_check: false)
if nil_check
define_method(name) do
raise "Option #{name} cannot be blank" if @options[name].nil?
@options[name]
end
else
define_method(name) { @options[name] }
end
private name
end
end
As for the file show.slim from the code above - I commented on all its contents, deleted it and even left it intact (with the methods described inPost :: Author :: ListItem :: Cell, but which were deleted, as I wrote above ) - this file does not affect anything. Apparently the error appears before it is processed.
What could be the problem
I'm not sure what you trying to do in your first line in the cell
option_property-> that's not a defined method call anywhere in Cells project if I remember correctly.P.S.: I suggest to head down to the Gitter channel for TRB project, you will get a response there much quicker than anywhere else.