Skip to content
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

TypeError when copying single page #6

Open
dkreft opened this issue May 19, 2010 · 0 comments
Open

TypeError when copying single page #6

dkreft opened this issue May 19, 2010 · 0 comments

Comments

@dkreft
Copy link

dkreft commented May 19, 2010

Case:
Select "Copy page only" from popup menu; accept default values; click "OK" button.

Error:
TypeError (can't convert Fixnum into String):
vendor/extensions/copy_move/lib/copy_move/model.rb:8:in +' vendor/extensions/copy_move/lib/copy_move/model.rb:8:innew_slug_and_title_under'
vendor/extensions/copy_move/lib/copy_move/model.rb:20:in copy_to' vendor/extensions/copy_move/lib/copy_move/controller.rb:14:incopy_page'
radiant (0.8.2) vendor/plugins/haml/rails/./lib/sass/plugin/rails.rb:19:in `process'

Environment:
ruby 1.8.7 (2008-06-20 patchlevel 22) [i686-linux]
Rails 2.3.3
Radiant 0.8.2

Patch:

    --- a/lib/copy_move/model.rb
    +++ b/lib/copy_move/model.rb
    @@ -5,7 +5,7 @@ module CopyMove
           test_page.parent = parent
           until test_page.valid?
             index = (index || 0) + 1
    -        test_page.title = "#{title} (Copy#{' '+index if index > 1})"
    +        test_page.title = "#{title} (Copy#{' '+index.to_s if index > 1})"
             test_page.slug = "#{slug}-#{index}"
           end
           {:slug => test_page.slug, :title => test_page.title}
    @@ -43,4 +43,4 @@ module CopyMove
           self.attributes.dup.delete_if {|k,v| [:id, :parent_id].include?(k.to_sym) }
         end
       end
    -end
    \ No newline at end of file
    +end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant