[Rails] Re: How to add additional path for views location
Jordon Bedwell wrote in post #1089069:
> On Fri, Dec 14, 2012 at 2:17 AM, Damjan Rems <lists@ruby-forum.com>
> wrote:
>> How to add another path where views can be found.
>
> See:
>
http://api.rubyonrails.org/classes/AbstractController/ViewPaths/ClassMethods.html#method-i-prepend_view_path
>
> ```ruby
> MyController < ApplicationController
> prepend_view_path "#{Rails.root}/vendor/myapp/views/myctrl"
> end
> ```
>
> OR in your configuration you can apply it globally:
>
> ```ruby
> config.paths["app/views"].unshift("#{Rails.root}/vendor/myapp/views/myctrl")
> ```
I forgot to add that I use rails 3.2.9
Second one is not working too.
Missing partial testing/index with {:locale=>[:sl], :formats=>[:html],
:handlers=>[:erb, :builder, :coffee]}. Searched in:
* "/wwww/rails/testapp/app/views"
*
"/wwww/rails/testapp/vendor/ruby/1.9.1/gems/kaminari-0.14.1/app/views"
althow debuging shows that path is added to config.paths["app/views"]
array.
by
TheR
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home