Render custom mime types

So I have this in my environment.rb file:

Mime::Type.register_alias “text/html”, :help

Then in one of my views I have this:

<%= render :partial => formatted_summary_account_path(“help”) %>

In my view folder I have _summary.help.erb

When pulling up summary.erb I get this error:

ActionView::MissingTemplate in Accounts#summary

Showing accounts/summary.erb where line #102 raised:

Missing template account/_summary.help in view path
/Users/nate/Projects/rails/infused/apps/customerhub/app/views

Extracted source (around line #102):

99: <%= image_tag current_style.company_logo.url %>
100:
101:


102: <%= render :partial =>
formatted_summary_account_path(“help”) %>
103:

104:
105:

I dont’ understand because I do have _summary.help there. Please Help.

Anyone?

Nate L. wrote:

Missing template account/_summary.help in view path

Seems like the path to your partial is wonky, as it’s looking for
account/_summary.help (singular) while your folder name is accounts
(plural).

Ar Chron wrote:

Nate L. wrote:

Missing template account/_summary.help in view path

Seems like the path to your partial is wonky, as it’s looking for
account/_summary.help (singular) while your folder name is accounts
(plural).

Thanks for the reply… thanks for pointing that out. In my routes file
i reference account singular… so in my app i just reference some like
summary_account_path to go to the summary page in the accounts folder.
Maybe the formatted doesn’t work the same?

Here is what I have in my routes file for account:

map.resource :account, :member => {
:settings => :get,
:reactivate => :put,
:summary => :get
}, :has_many => :users

So i was assuming I could reference
formatted_summary_account_path(“help”) the same way. Any ideas why this
isn’t working?

Nate L. wrote:

Any ideas?

What does rake routes report?

I assume that you’ll need to dig around in the helper to see exactly
what’s going on as to why accounts becomes account in the formatted
version of the path…

For curiosity’s sake, what happens if you

map.resources :accounts {etc etc}

Can anyone help me on why the formatted_summary_account_path(‘help’)
would reference the plural for of accounts?

In my app I can reference summary_account_path which references the
‘accounts’ folder, but as soon as I add the formatted_ on it changes and
references the ‘account’ folder which doesn’t exist.

Any ideas?