Displaying 20 results from an estimated 700 matches similar to: "Custom View Location"
2005 Oct 28
2
Accessing fixture
I have a very simple problem. I can''t seem to access
a the fixture by name
I have a sites.yml with:
simple_site:
id: 1
name: demo
description: A demo site
created_on: 2005-10-25 00:00:00
updated_on: 2005-10-25 00:00:00
And I have a test class as:
require File.dirname(__FILE__) + ''/../test_helper''
class SiteTest < Test::Unit::TestCase
fixtures
2008 Sep 08
2
Problems with async worker request
Sorry if this comes through twice. I already sent this once, before joining
the mailing list.
I''m attempting to use Backgroundrb to handle asynchronous pdf creation, but
in doing so, I''ve run into a very strange problem. Below is a method that''s
called from the controller which creates a new worker, then grabs the worker
and calls the ''build_pdf''
2010 Oct 14
3
XCP: buitin templates (how they works?)
Good day.
I''m pretty curious, how they work with netinst (debian, suse, ubuntu,
centos)...
As I understand, at first start they downloads xen-aware kernel and
netinst initrd from repository (with one user must point with
other-config:install-repository)...
But how they do it? I means, this some kind of script, some kind of
variables...
Really, I''d like to do few more
2011 Mar 04
1
How to modify the template path for ActionMailer used in a Ruby script ?
I am testing a ruby 1.9.2 script (it''ll be run in a cron task
later...) in which I am trying to use ActionMailer
All my files are in a single folder ''joinus_email
- joinus_email
joinus_email.rb
notifier.rb
- notifications
joinus_email.html.erb
joinus_email.text.erb
running the script joinus_email.rb, (in which I defined the
2006 May 08
6
how to make field in model immutable after create
Hello everyone!
I want to have login field in User model which is set only once (on
create), and then it should fail validation if the value is changed.
How can I do this? I dig around for validation and tried
def after_validation_on_update
unless User.find_by_login(:login)
errors.add(:login, "is immutable. You can''t change it")
end
end
in model, but somewhat it
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
2006 Mar 28
5
Rails 1.1 for new apps only
Hi,
I was very excited to hear that Rails 1.1 project has been released. It gave me the fire I need to get started on a pet project I''ve been thinking about. However I have a couple apps that don''t seem to play nice with Rails 1.1, mainly Typo.
So my question is: How can I install Rails 1.1 for only a new application?
thanks, scott.
2006 Mar 13
1
Multiple instances of the same app
I''ve got the same basic app that I''d like to run on a couple domains.
It''s very simple and the functionality would stay the same, but
templates would be different. I was wondering if there''s a way I can
just run one instance of the app so that I don''t have to have multiple
fcgi processes for each site. Is that a good approach for something
like a
2006 Feb 22
5
[OT] Apache rewrite stuff...
Hi all, a little off topic, but was wondering what the best way is to
re-write incoming requests so that they all end up at the same domain.
For example, if I had:
my_domain.net
my_domain.com
my_domain.org
Whats the best way to map/redirect all of these to
www.my_domain.com
?
I know its possible, just not sure what to add for rules/virtual hosts
in my apache config.
Thanks for the help!
-Nick
2006 Aug 01
1
Transactions within the Controller
Hi,
I have 2 models, how can I save both of them in one transaction?
I want to do something like this:
begin transaction
project.save
person.save
end transaction
The only examples I''ve seen is with saving 2 instances of the same model in a transaction.
thanks
scott.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Jul 11
1
Aggregate Controllers
Hi,
I''m developing a dashboard like page and basically want to combine the result of multiple actions on a page. I''ve done this so far:
def index
r1 = render_to_string :action => "action1"
r2 = render_to_string :action => "action2"
render :text => r1+r2
end
This works, but now I want to render from other controllers and this is where
2006 Apr 03
3
How do I programmatically send a 404 error
I want to programmatically under certain conditions return a 404 (page
not found) error to the browser. How can I do this from my controller?
I''m assuming I need to set a header on the reponse obect. However I
can''t figure out what the header name is.
thanks, scott.
--
Posted via http://www.ruby-forum.com/.
2006 Feb 11
1
Fastcgi and mysql woes
Hi,
I have been heck of a time to get mysql and fastcgi to
work properly on my Mac OS X box. I keep getting the
following error: Can''t connect to local MySQL server
through socket ''/opt/local/var/run/mysql5/mysqld.sock''
(13)
I have even tried commenting out the "socket" option
in my database.yml but it still gives me the same
error. I''m ok when I
2011 May 20
5
views w locale default template
[RAILS3]
I hesitate on how handling the locale view templates to default to
one language only ..
sending admin emails will go only to one locale ''en_GB''
should I set it up into the template name and set I18n.locale to
''en_GB''
membership_renew.en_GB.html.erb
OR
whatever locale is used , if I have :
membership_renew.html
it will be the default ?
--
2006 Jun 06
5
[OT] O''Reilly Cookbooks
Hi,
Has anyone gotten the "roughcuts" of the Ruby and Rails cookbooks? If you have the Pragmattic Rails Cookbook is the O''Reilly worth it? Also can you download PDF''s of their "roughcuts". The website is kind of vague, it just mentions online access (whatever that means).
Thanks in advance.
2006 Jan 12
3
ActionMailer bug?
Hi ,
I have actionamailer working properly with a template and a model for
creating the mail object etc. The whole thing works correctly if I use
Webrick.but when I use it on Apache,i get the error which says "template
missing".rails is unable to find the template for the mailer
object.Hasanyone noticed this?
Vivek
PS:I am still not using the 1.0 version
-------------- next part
2005 Dec 19
1
Preserving fallback with RJS
Hi guys,
I really like RJS. I think they''ll replace partials in alot of
instances. Unfortunately, because they''re automatically used like
.rhtml and .rxml and are hard to specifically specify it makes it
messy to preserve fallbacks when using them. For instance, using
partials instead of rjs, my create method might look like:
def create
post = Post.new(params[:post])
...
2007 Aug 14
12
expect_render, why does there need to be a warning
There is a warning on the web site about expect_render and stub_render:
"WARNING: expect_render and stub_render, while very useful, act
differently from standard Message Expectations (a.k.a. mock
expectations), which would never pass calls through to the real
object. This can be very confusing when there are failures if you''re
not aware of this fact, because some calls will be
2011 Oct 12
0
Override values from default node inheritance (variable scoping).
Hi,
I have a pretty basic question about variable scooping. We have been
using puppet for the past few weeks now and were running into some
problems which are probably caused by a lack of understanding or best
practices.
We have run into the following scenario and are not sure how to fix
this. The majority of our host all use the same resolvers in our
network (our internal dns servers) but there
2017 Apr 30
1
Upgrade Samba 4.2 to 4.6
I have two DC's with Samba 4.2.1 (primary DC) and 4.2.3 (secondary DC). I
have installed Samba 4 from the source code (configure,make,make install).
I'm using rfc 2307.
How can I update to Samba 4.6.3 version ?
Is the same strucure samba 4.6 version and samba 4.2? Is there any
incompatibility?
Regards,
Márcio Bacci