Displaying 20 results from an estimated 200 matches similar to: "Tests for render when changing view_paths"
2007 Aug 15
5
Misc notes concerning view_paths
Hi all,
I''ve been playing in the trunk with putting stuff in different dirs
to keep files from a reusable framework separate from the app files.
Here are a few considerations regarding the view_paths setting:
config.view_path is used to set both action_controller.view_paths and
action_mailer.template_root. We get some buggy/unexpected behavior
here because
2009 Jul 20
0
how to use view_paths() and why you need to use.
how to use view_paths() and why you need to use. What is the
purpose. can you explain and give some sample code.
2007 Oct 02
19
Per-Request View Paths
I haven''t had a chance to work on fixing multiple controller view paths
recently. My original patch attempt was:
http://dev.rubyonrails.org/ticket/8582
It was rejected due to the fact that it was fixing the symptom more than the
problem.
However, I think it''s critical that this problem get fixed, otherwise the
whole concept of view_paths is severely neutered and
2007 Dec 23
5
prepend_view_path not working
Now that controllers can have multiple view paths I''ve been playing with
themes over the weekend. Running into a view issues. I have a
before_filter in the ApplicationController that calls prepend_view_path
to add the path of my theme. I even log the view_paths in an
after_filter to make sure it made it all the way through. The output
looks something like:
2011 Feb 21
2
self.prepend_view_path - am I missing something
I have an app that varies its content based upon the domain from which
it is being accessed. Some of the domain characteristics are
supported in the model but it is easier varying static text in the
views and then sharing the form templates via partials etc.
Rails 2.3.10 and looking at the documentation at
2010 Oct 20
7
How can I render a template outside of a controller in Rails 3?
Hi All,
I can''t seem to render a template outside of a controller in my Rails 3
application. The googling I''ve done has been helpful, and I eventually found
some useful info at
http://www.swombat.com/rails-rendering-templates-outside-of-a-contro.
However, this seems to be broken in Rails 3. Does anyone have any ideas how
I can fix this method or perhaps know of a better
2008 Jun 14
0
does BackgrounDRB not "know" the rails environment it is running within/in parallel with?]
Hi,
it probably is a noob question but I''m confused by this error message:
active_support/dependencies.rb:478:in `const_missing'': uninitialized
constant Invoice::ApplicationController
Situation:
I have an InvoicesController with a create method that in turn calls
upon a MiddleMan.worker(:billing_worker), which in turn finds an Invoice
and calls upon @invoice.print_invoice
2007 Apr 05
5
Odd error handling in ActionView#compile_template causes WSOD
If a view file cannot be compiled (eg it has a block with a missing
''end'' statement), I''m experiencing WSODs - the browser reports a lost
network connection, rather than the helpful compilation error that we
used to have.
When the compilation fails, ActionView#compile_template raises this
error :
TemplateError.new(find_base_path_for(file_name || template), file_name
||
2008 Mar 14
1
Rails App freezes when accessed
Hi All,
I just had this problem come up today and so far I''m stumped. This
morning, my mongrels were all completely unresponsive. I had to kill
-9 them to get them to go away. I restarted them, but the first time
that they were accessed they froze again. Nothing gets printed to the
logs. I tried starting a single mongrel and accessing it directly.
If I hit CTRL-C before accessing
2006 Jul 19
1
A couple of problems
Hi Ezra,
Thanks for the great work on BackgrounDRb. I have come across a
couple of problems.
1. I wanted to define a simple class in the worker file to wrap up and
pass back some data to my controller. It seems that if I create the
class either inside or outside of my worker class (in the same file)
it gets wrapper by a DRb::DRbUknown object and therefore cannot be
accessed from my controller.
2018 Jan 13
0
[PATCH] drmmode: update logic for dynamic connectors, paths, and tiles
This largely copies the code from modesetting with minor adjustments.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
I've tried privately to get people to test this out, but to no avail.
I don't have the hardware to verify this one way or the other. Ideally
with this patch you should be (a) able to use a tiled monitor at 60hz
with DP-MST and (b) be able to see connectors
2008 Mar 19
3
ApplicationHelper
When working with views, I use instance methods of ApplicationHelper:
# app/helpers/application_helper.rb:
module ApplicationHelper
def distribute(total, min, cutof, list)
[1,2,3]
end
end
# app/views/planner/_mta_colors.rhtml:
<td>
<%
...
dist = distribute(total_v_px, 4, 0, colors.collect{|color| color[1]})
...
%>
So to test the distribute method in ApplicationHelper, I have
2008 Dec 03
5
How to test a plugin
Guys,
I''ve created a plugin, i wanna put my automated test there.
However, I got bad file descriptor error when i run the test like normal
unit test file:
"ruby plugins/acts_as_fox/test/acts_as_fox_test.rb"
How to test a plugin?
Also, is it right to say that I should only put my unit tests (but not
functional test for example) for the plugin in the plugin test folder?
2018 Oct 09
0
[PATCH] drmmode: update logic for dynamic connectors, paths, and tiles
This largely copies the code from modesetting with minor adjustments.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
I've tested this back and forth with a GTX 960 + 2x U2415 monitors,
chained to each other. I turned them on/off. I messed with their DP
1.1/1.2 settings. I pulled plugs a few times.
This seems to pass the test. No crashes, the connectors seem to come
and go
2006 Jun 21
0
fcgi_watch (reaper replacement for shared servers)
fcgi_watch is a supplement to (or replacement for)
<rails_app>/script/process/reaper.
The standard reaper script searches for all processes started with a
given pathname using the output from a ps command, and performs an
action on them. There are problems with this approach, at least on some
shared servers:
- The pathname seen from a script is not necessarily the same as the
2006 May 14
4
script/console on windows
Hiall,
When I try to run script/console from a windows command line like
f:\rails_app\ruby script\console
I get the following error:
F:/Programme/Ruby-1.8.4/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require__'': no such file to load -- initializer (LoadError)
from F:/Programme/Ruby-1.8.4/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require''
2008 Mar 24
2
render not able to locate template in publisher
Hi guys,
I have a publisher called UserPublisher setup in models directory of
my app. The reason I have it in a model is because its then possible
for me to invoke publisher methods in after_callbacks of my other
models, just the way we do it for ActionMailer.
My problem is that when I try to update a users profile specifying
location of the view template as a paramater to "profile"
2006 May 07
0
NoMethodError trying to get ApplicationHelper method from a functional test
I am a little confused by the includes I suspect. In the book, it states
that runtime environment will load the directories app, app/models,
app/controllers, app/helpers, app/apis, components, config, lib, vendor and
vendor/rails/*.
However, when I try to access my "current_project" public method, it fails
with a NoMethodError.
What is even stranger is that I can use reflection to find
2005 Nov 05
4
Changing plugins_path in Rails::Configuration
I have two apps sharing a common model and lib. I''d like to share my
plugins as well, however I noticed that the plugins_path in the
Rails::Configuration (0.14.2) is not accessible as is view_path or
log_path. What would be the best way to go about accomplishing this?
Thanks.
--Ryan
2006 Sep 29
2
ApplicationHelper is not a parent of SomeHelper?
i have:
# file application_helper.rb
module ApplicationHelper
def load_components
@right_sidebar = ''some stuffs''
end
end
# file user_public/blog_helper.rb
module UserPublic::BlogHelper
def load_components
ApplicationHelper.load_components
@right_sidebar += ''{blog archive}''
end
end
the problem is, i want to load the