Skip to content

Error in the old 1.12 version #79

@JohnSmall

Description

@JohnSmall

I have to use the old 1.12 version because the new one requires Comfy >=2.0.0 which requires Rails >= 5.2, which I don't have time to upgrade to. I'm on Rails 5.0.2

I assumed the old version 1.12 of comfy blog would work with Comfy 1.12, but it doesn't

Expected behavior

When creating a new blog I should not get dumped into an error page

Actual behavior

  ArgumentError in Comfy::Admin::Blog::Blogs#new
 gems/comfy_blog-1.12.3/app/views/comfy/admin/blog/blogs/_form.html.haml where line #5 raised
wrong number of arguments (given 0, expected 1)
# List of available application layouts
  def self.app_layouts_for_select(view_paths)
    view_paths.map(&:to_s).select { |path| path.start_with?(Rails.root.to_s) }.flat_map do |full_path|
      Dir.glob("#{full_path}/layouts/**/*.html.*").collect do |filename|
        filename.gsub!("#{full_path}/layouts/", '')

Steps to reproduce

  1. Install Comfy blog 1.12 in a working Comfy 1.12 system
  2. Generate and run migrations
  3. Go to the admin page and click on 'Blogs' in the left menu
  4. Click the 'New Blog' button.
    You get dumped into the error page

System configuration

Rails version:
5.0.2
CMS version:
1.12
Ruby version:
2.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions