Displaying 20 results from an estimated 1000 matches similar to: "Setting the user for FastCGI processes?"
2005 Sep 13
12
PDF views?
I know there''s wiki page on generating PDF[*], but that''s not really
what I want. I don''t need to create arbitrary PDF. What I''d like to do
is create PDF templates and fill in the blanks. Roughly, I''m looking
for functionality akin to the mail merge feature of word processors,
including conditional and repeated elements, say, table rows.
Michael
2005 Sep 06
4
url_for: :overwrite_params went missing
Somewhere between 0.13.1 and the current SVN version
the :overwrite_params option to url_for (and related methods) went
missing. I can''t tell whether this was deliberate or by mistake, and I
have no idea how to get the same functionality in some other way
either.
Michael
--
Michael Schuerig Life is what happens
2005 Aug 23
0
Fixtures: pluraly bitten
With my functional tests (on PgSQL) I get strange errors like this
1) Error:
test_create(AufgabeControllerTest):
ActiveRecord::StatementInvalid: ERROR: duplicate key violates unique
constraint "aufgaben_pkey"
Tracking this down, I found that sequences are only reset for some of
the tables I''m using. The reason? Inconsistent singularization.
I won''t go so far as
2009 May 12
4
has_many :through and scopes: how to mutate the set of associated objects?
I have a model layer containing Movie, Person, Role, and RoleType,
making it possible to express facts such as "Clint Easterbunny is
director of the movie Gran Milano".
The relevant model and associations look like this
class Movie < ActiveRecord::Base
has_many :roles, :include => :role_type, :dependent => :destroy
has_many :participants, :through => :roles, :source
2005 Aug 16
1
Defining model classes for enumerations
I have several tables for enumerations. They all have the same content:
id, name, position. I''d like to avoid the tedious work of defining a
class for each one explicitly. Not least, in order to avoid clutter in
the model directory.
Here''s what I''ve come up with:
class EnumRecord < ActiveRecord::Base
def self.define_enums(*enums)
enums.each do |spec|
2005 Aug 28
8
Save and delete buttons: POST vs. proximity dilemma
I''m in a dilemma: In order to keep GET requests from deleting objects,
I''d like to use the button_to helper to get "something" that generates
a POST request. Unfortunately, that something is a form and forms can''t
be nested.
I''d also like to place buttons related to the same form close to each
other. At the top are some navigational buttons
2008 Apr 29
4
Default values for belongs_to and has_one
There really doesn''t seem to be a *declarative* way to define a default
value for belongs_to and has_one associations
class Person < ActiveRecord::Base
belongs_to :address
end
p = Person.new
p.address.city = ''Atlantis'' # Bummer!
Of course, there''s an easy way to avoid this
class Person < ActiveRecord::Base
belongs_to :address
2006 Jan 19
5
RoR still not working on SuSE 9.0 - incomplete headers received
Hi,
I''ve already posted my problem a few weeks ago on several forums, or
lists. I still have the same problem:
I have a SuSE 9.0 machine, Apache 2.x, ruby 1.8.4 I wanna get RoR
working with fastCGI.
I have installed different versions of fastCGI, have checked the
permissions of the fcgi-ipc directory, reinstalled everything and it
still doesn''t work.
In the browser window I
2007 Jan 03
3
Self-referential habtm with condition is broken
Here''s a simplistic model class.
class Person < ActiveRecord::Base
has_and_belongs_to_many :relatives,
:class_name => ''Person'', :join_table => ''relatives'',
:foreign_key => ''from_id'', :association_foreign_key => ''to_id''
has_and_belongs_to_many :brothers,
:class_name =>
2005 Aug 19
13
Enumerations (again): Comments please
Some of my earlier questions may have hinted ever so slightly in the
direction that I''m trying to implement "enumerations". By an
enumeration here I mean a class that has a fixed number of immutable
instances, which in turn have essentially only a name and a position.
Requirements I''ve tried to meet are
- Enumeration instances should only be loaded once from the
2007 Jan 11
2
In-place editor for a whole form?
I want to implement in-place editing for a hierarchical structure where
the nodes are not simple text fields, but need to be represented by at
least two input elements.
The Rails helpers only support in-place editing for a text field,
scriptaculous''s controls.js beyond that implements support for an
in-place editor containing a select element. I need an editor where I
essentially
2005 Aug 07
11
HABTM Movable Select Box
Hi,
I found it a while ago, an add-on to Rails for supporting movable select
boxes, but I searched through the wiki and the mailing list and couldnt
find what I was looking for. I was hoping someone might know of or
remember something about the project.
Thanks,
Dylan.
2005 Sep 11
3
Extending ActiveRecord::Base
Hey everyone,
I''m interested in extending ActiveRecord::Base. I have a special
"easier" find function that I want to include in all classes.
How can I include this in all classes?
Can I just create a model object that does something like this:
class ExtendedAR < ActiveRecord::Base
def self.special_find
...
end
end
and then all my other classes
2005 Aug 28
0
Position.clone and scroll offsets
I noticed that in a case where I use Position.clone, the element with
the cloned position is displayed somewhere off. My understanding of
positioning is a bit shaky at times, but I think clone needs to take
into account the scroll offsets as shown below.
Michael
var Position = {
...
clone: function(source, target) {
source = $(source);
target = $(target);
2009 May 19
4
proper way to ensure atomic model changes
Hi!
Say we have a rails active-record-based model called "instance" which
can have different states - STOPPED, RUNNING, STARTING_UP,
SHUTTING_DOWN, etc...
There is a method #start which changes the instance state to
STARTING_UP only if it is STOPPED.
def start
if self.state == STOPPED
self.state = STARTING_UP
self.save
...
end
end
As you understand if we have multiple
2005 Jul 26
6
implement audit trail table
has anyone has any idea how to implement audit trail table for all update /
deletion done on records?
I''m thinking to have corresponding audit trail table to each table, so
everthing before an update or deletion is done, a new record will be insert
into the corresponding audit trail table.
Is there a way to overwrite the save, destroy, method at the application
level? so that I do not
2006 Mar 13
9
apache 1 fastcgi config correct???
I followed this tutorial on the rails wiki about how to get apache with
fastcgi working on a vps machine:
http://wiki.rubyonrails.com/rails/pages/HowtoInstallAndRunRubyOnRailsOnCpanel
In the tutorial it said to add this to the httpd.conf file to get fastcgi
working.
<IfModule mod_fastcgi.c>
FastCgiIpcDir /tmp/fcgi_ipc/
AddHandler fastcgi-script .fcgi
</IfModule>
However
2010 Sep 15
5
OT: Installing static binary of wkhtmltopdf
This is OT but have not been able to get a response elsewhere (stack
overflow and the project site itself) so thought someone here might know or
have some ideas.
First, I am using wkhtmltopdf stand alone without any of the rails gems as I
found that for some reason using WickedPdf or PdfKit my pdf''s did not
generate with active links from the links from those in the html. When I run
2006 Apr 10
15
Apache/FastCGI still in development mode?
I''m running rails on RedHat ES3 managed by Plesk with Apache/FastCGI.
I''ve followed the directions here:
http://wiki.rubyonrails.com/rails/pages/HowtoInstallAndRunRubyOnRailsOnPlesk
And got everything working, but my application refuses to run in
Production mode. It runs in development mode despite the fact that I''ve
set:
FastCgiServer
2006 Aug 14
2
Plugins: Validation Reflection and Client-Side Validation
I''ve just put two plugins on RubyForge. Included below are the READMEs.
You can get the plugins at
svn://rubyforge.org//var/svn/valirefl/validation_reflection/trunk
svn://rubyforge.org//var/svn/clientsidevali/client_side_validation/trunk
Michael
Validation Reflection
=====================
Version 0.2, 2006-08-06
This plugin adds reflective access to validations
-