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

Add Support For Multiple and Many Attachments #46

Open
peakpg opened this issue May 6, 2011 · 0 comments
Open

Add Support For Multiple and Many Attachments #46

peakpg opened this issue May 6, 2011 · 0 comments
Labels

Comments

@peakpg
Copy link
Collaborator

peakpg commented May 6, 2011

Imported from lighthouse. Original ticket at: http://browsermedia.lighthouseapp.com/projects/28481/tickets/28. Created by Gordon Anderson - 2009-10-23 13:41:07 UTC

Steps to recreate are as follows:

  • checkout browsercms from git and reset head to 4a123752d3cf417fdd4d10ea34a92ab9d3236c39
  • sudo rake cms:install
  • in a separate directory execute ' rails browsercmstest -d postgresql -m /path/to/browsercms/templates/blank.rb'
  • Now create a custom content type using './script/generate content_block client name:string description:html image:attachment'
  • Upon starting the server, and logging in, when I try to create a new content type of 'client' I get this error:

Message
undefined method `cms__url' for #Cms::ClientsController:0x2f0bc3c
Stacktrace
On line #8 of /opt/local/lib/ruby/gems/1.8/gems/browser_cms-3.0.0.203/app/views/cms/blocks/new.html.erb

5: <% @page_title = "Content Library / Add New #{content_type.display_name}" %>
6: <% @toolbar_title = "Add New #{content_type.display_name}" %>
7: <% content_for :functions,  render(:partial => 'cms/blocks/toolbar') %>
8: <% form_for(@block, :url => blocks_path, :html => {:multipart => true}) do |f| %>
9:   <%= f.error_messages %>
10:   <%= render :partial => 'cms/shared/exception', :object => @exception if @exception %>
11:   <%= render :partial => 'cms/blocks/hidden_fields', :locals => {:f => f} %>

/opt/local/lib/ruby/gems/1.8/gems/browser_cms-3.0.0.203/app/helpers/cms/path_helper.rb:8:in `send'
/opt/local/lib/ruby/gems/1.8/gems/browser_cms-3.0.0.203/app/helpers/cms/path_helper.rb:8:in `cms_index_url_for'
/opt/local/lib/ruby/gems/1.8/gems/browser_cms-3.0.0.203/app/controllers/cms/content_block_controller.rb:148:in `blocks_path'
(eval):2:in `send'
(eval):2:in `blocks_path'
/opt/local/lib/ruby/gems/1.8/gems/browser_cms-3.0.0.203/app/views/cms/blocks/new.html.erb:8
/opt/local/lib/ruby/gems/1.8/gems/browser_cms-3.0.0.203/app/controllers/cms/content_block_controller.rb:185:in `after_create_on_failure'
/opt/local/lib/ruby/gems/1.8/gems/browser_cms-3.0.0.203/app/controllers/cms/content_block_controller.rb:190:in `after_create_on_error'
/opt/local/lib/ruby/gems/1.8/gems/browser_cms-3.0.0.203/app/controllers/cms/content_block_controller.rb:36:in `create'

At first glance it looks like this method (in path_helper.rb) is failing:

def cms_index_url_for(resource, options={})
send("cms_#{resource_collection_name(resource).pluralize}_url", options)
end

It is returning cms__url, ie the middle section is blank

Thanks

Gordon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant