Closed harrisrobin closed 10 years ago
It looks like a problem in your code at first, not in Monologue. There is no such variables or method in all Monologue's code. Can you past the full stack trace in a gist please and give us the link to it?
My guess: your navbar is trying to call cv_path
, but from Monologue's context maybe?
Full trace : https://gist.github.com/HarrisRobin/8736791
It works perfectly fine when i render shared/nav in application.html.erb that is located in views/layouts.application.html.erb. What you are saying sounds right (from my limited and rookie perspective) but how do i fix it ?
P.S: I'm loving monologue, thanks for making it so easy to integrate!
Routes :
HarrisrobinCo::Application.routes.draw do
get "pages/cv" resources :contacts, only: [:new, :create] root to: 'pages#about' get '/projects' => 'pages#projects' get '/about' => 'pages#about' get '/cv' => 'pages#cv'
`# This line mounts Monologue's routes at the root of your application.
#
mount Monologue::Engine, at: '/blog' # or whatever path, be it "/blog" or "/monologue"`
end
It looks like it is missing at least one or a couple lines at the beginning?
Is your application open source so I could look at the code? Else, can you create a demo app reproducing that?
It looks like the problem is on line 7 of app/views/shared/_nav.html.erb
...what is that line? What is that file? Your navbar I guess? hehe
https://github.com/HarrisRobin/harrisrobin.co
I have commited the latest changes, it is open source.
To answer your question, the whole page is my navbar that is why im jsut rendering it. Line 7 is the following :
<li><i class="icon-attach"></i><%= link_to 'curriculum vitae', cv_path %> </li>
Try changing cv_path
for main_app.cv_path
? It looks like it is a route, but from the main app, and it does not exists as a Monologue path...
That fixed it! However, it is not taking the styling it had. Should I copy it's styling to monologue's directory ? (ill just do that if nothing works). Is there a "recommended" way of doing this ?
Thanks for your help, at least it's there now :)
Edit: nevermind, it worked flawlessly.
Thanks again! :D
:+1:
Hello!
so I have created views/layouts/monologue/application.html.erb and i was able to override things, until i attempted to add my nav bar by saying
<%= render "shared/nav" %>
I get the following error :
undefined local variable or method
cv_path' for #<#I don't know how to fix it, I just want the navbar from my main website to appear on my monologue blog so that it matches :)
Thanks, Harris