Displaying 20 results from an estimated 2000 matches similar to: "Activerecord attribute without db column"
2006 Jul 21
2
Tableless ActiveRecord attribute and my aching head
I beat my head against a wall for almost 2 hours with this issue.
My first problem was easily solved. I wanted a class that could use
ActiveRecord''s validation capabilities but without using a table behind
it (I would be persisting setup information in the session, but the
initial setup parameters come from a user input form)
No problem...found this link which got me up and running
2006 Aug 16
3
Validate your forms with a table-less model
Ive followed this example of how to validate a form with a tableless
model:
http://rails.techno-weenie.net/tip/2005/11/19/validate_your_forms_with_a_table_less_model
Ive got this example working but when validation fails the failed boxes
are not highlighted in red. At the moment i have a contact details form
and want to validate the information entered by the user but this will
just result
2005 May 27
2
Interco H323 : IPNx (from WTL) and *
Hi,
Someone released a succefull interconnection in H323 with WTL equipement
?
I'm trying to do that with an IPNx. But get dead air.
With chan_oh323 it's fine, all works. With chan_h323 => dead air.
The configuration is GW to GW.
This is my configuration from h323.conf:
[general]
port=1720
bindaddr=my.ipaddr
dtmfmode=rfc2833
2012 Nov 15
2
survreg & gompertz
Hi all,
Sorry if this has been answered already, but I couldn't find it in the
archives or general internet.
Is it possible to implement the gompertz distribution as
survreg.distribution to use with survreg of the survival library?
I haven't found anything and recent attempts from my side weren't
succefull so far.
I know that other packages like 'eha' and
2006 Jul 18
7
Observer not working
Help please.
I''m trying to observe a User class, but I can''t get this to work, the
after_create method never gets called... (the breakpoint never gets
called)
app/models/user_observer.rb:
class UserObserver < ActiveRecord::Observer
def after_create(user)
breakpoint
setting =
2006 May 24
2
Gallery2 integration
Is anybody working already in a gallery2/rails integration?
I need to use it as part of my project, so, before start from scratch
with it I''d like to know if already is something out there.
Thanks.
2012 Mar 01
1
Problem to Replicate
Hello list, Iam using Samba4 alpha18 with Debian Squeeze. Mi primary
domain have Windows Server 2003 and my Secundary Domain have Samba4. When
i create a user in active directory user and computer in Windows Server, i
can see the user in active directory user and computer in samba4, and when
i create a user in samba4 i can see this user en active directory windows
server. the principal problem is
2006 Aug 02
7
String lenth limit
Hi,
I''ve seen some time ago a function which, given a string like "this is a
very long string" would return , for example limitin it to 10 chars "this
is a..." , but I can''t remember where..... I''ve searched throwth the apis
of rails and ruby itself and I can''t find it.
Thanks everybody..
2006 Jun 21
2
raw sql and columns order
Hi, I''ve a model with the following method:
def self.run(sql)
return connection.select_all(sql)
end
so, the value returned is an array of hashes... the problen is that the sql
command:
"select name, id from table"
and
select id,name from table"
returns the columns in the same order (name, id).
And in my view, I need to keep the order of the SQL command.
2008 Mar 21
3
Problem with user regsitration and ldap on SVN version
Hi guys,
I'm trying to use Asterisk with LDAP integration.
I created some schemas and it seems to work fine for sip.conf replacement.
When I try to register a softphone to test the service, it seems ok from the softphone point of view (user registred) but when I do a
"sip show peers", no one is registered (nor sip show subrscriptions, users...)
I put my Asterisk on full debug and I
2006 Jun 27
2
Using a different layout/styleshheet
Hi,
I have a view that I use to display and capture data. Once the user
has input the required data, I then need to be able to print the view.
I know that I can setup a stylesheet to take care of the page layout
but it is not clear to me how I will make the print view call the new
layout.
If anyone could clarify this or point met in the right direction, I
would be most grateful.
Regards,
Paul
2006 Jun 02
5
Firefox extension for ajax debugging
or similar...
Is there any extension for firefox so that I can view the source code of
ajax returned content?
Thanks everybody.
2006 Jan 04
4
file_column
I use file_column and it works fine.
I tried to change the store_dir to a the path I want my files to be
stored and not the default.
I stored some images fine. But when I try to reach my images it seems
like file_column uses the model_name/attribute_name on the image and not
the store_dir I used. How can I change this ?
Thanks in advance
--
Alexander Antonakakis
2006 Jan 29
1
Accessing attributes
I have a name of an attribute and I need to get its value and set a new
value for it:
x1 = a.foo
a.foo = x2
How do I do that if the name of the attribute ''foo'' is a var?
I thought about doing this:
attribute_name = ''foo''
x1 = a.attributes[attribute_name]
a.attributes[attribute_name] = x2
but this is a bypass and I''m quite sure it would cause
2009 Jun 14
5
Partials views and instance variables go nil
Hi everyone!
Model: http://pastie.org/511290
Controller: http://pastie.org/511285
View new: http://pastie.org/511286
View _form: http://pastie.org/511284
When I hit submit button there''s an error for usuarios(users in
portuguese) instance. It does not seems to save usuarios even though it
seems to be posted by the form.
Error: http://pastie.org/511292
Need some help here guys plz
--
2010 Sep 15
2
lapack in R 2.11.1 (Ubuntu 10.04.1)
Hi there,
I'm trying to install the package RcppArmadillo in my R 2.11.1 which I installed
and regularly update via Ubuntu's repositories.
When I try to install RcppArmadillo from CRAN I get:
> install.packages('RcppArmadillo', lib='~/myRlibs')
[...]
g++ -shared -o RcppArmadillo.so RcppArmadillo.o fastLm.o
-L/home/matias/myRlibs/Rcpp/lib -lRcpp
2006 Aug 10
1
reusing previous code
Hi,
I have a couple of controllers, views, models and mailers for a given
functionality (for example, user registration). ?what is the best way to
share them between multiple applications so that I don''t have to copy them
over and over again?
Thanks.
2006 Mar 19
3
How can I access an attribute via a symbol?
In my model I''d like to write a method that accesses the attributes by
name. A very simple implementation would be
class MyModel < ActiveRecord::Base
def get_value(attribute)
return value_of_attribute
end
end
Then I can call it with m.get_value(:name) to get the value of the
name column in the db. I''m not sure what to put in for
2006 Mar 12
1
Problem with --partial and rsync algorithm
Hi,
I'm running the following command for a remote host backup:
/usr/local/bin/rsync -a --delete --delete-excluded -v --timeout=120 -z
--no-whole-file -partial --partial-dir .rsync-partial --exclude=/sys/*
--exclude=/tmp/* --exclude=/stuff/distfiles/* --exclude=/stuff/sistema/*
--exclude=/stuff2/ftp/* --exclude=/stuff2/backup/* --exclude=/home/ftp/*
--exclude=/home/gentoo/* --exclude=/mnt/*
2006 Jan 18
15
Anyone got Globalize working???
Hi all
In another thread I complain about an error I get after trying to get
Globalize working.
http://www.ruby-forum.com/topic/51988#new
Now I want to ask you, if anybody of you has ever got Globalize working?
I have done exactly what''s written in the (absolutely much too short)
tutorial of its wiki...
http://globalize.diluvia.net/wiki
...and I''m very frustrated that no