Displaying 20 results from an estimated 55 matches for "attribute_names".
Did you mean:
attribute_name
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
2015 Oct 14
2
Use repadmin /showobjmeta would caused samba 4.3.0 fault
I had a AD with 4 Win2003 DC. Now I use a samba4 server as a additional DC.
Samba4 server system version: ubuntu 15.04
Samba version: samba 4.3.0
The replication from win2003 DC to samba4 DC was success. But have
some problem from samba4 DC to win2003 DC. I can run "samba-tool drs
showrepl" without error. But in log.samba it can found many message
like:
[2015/10/09 12:53:11.562088, 0]
2008 Mar 21
1
----www.cdsportal.net---- wholesale voip provider
Why pay 1.1 cent's a minute for interconnecting to another Asterisk server
for a high volume call center.
Do people really understand what they are trying to sale and take an honest
look into what they advertise.
As a high volume user like a call center I would not connect my Asterisk Box
to there Asterisk Box to a third Sip provider who then hands of to the Level
3 and so forth.
With LD
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 May 03
1
Localizing attributes when using I18n
...ng a multilingual app on rails 2.2. I liked very
much the idea of Xavier Defrang to provide a locale-aware accessor for
the fields that needs a translation: http://defrang.com/articles/2005/12/02/playing-with-rails-i18n
I modified code a little to make it work with rails 2.2:
def self.localize(*attribute_names)
attribute_names.each do |attribute_name|
class_eval %{
def _#{attribute_name}
localized_method = "#{attribute_name}_\#
{I18n.locale.to_s}"
return send(localized_method.to_sym) if respond_to?
(localized_method)
#{attribute_name}...
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
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
--
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
2006 Feb 20
2
file_column: changing default store_dir
File_column plugin is great. I need to change the default :store_dir
from the dynamic "model_name/attribute_name" to an equally dynamic
"client_id/app_id/model_name/attribute_name". In my model I have:
class Component < ActiveRecord::Base
belongs_to :component_type
belongs_to :component_group
breakpoint
file_column :content,
:magick => { :versions
2008 Dec 20
9
Upgrade to Rails 2 - problem with "save" (MySQL boolean issue?)
I have been working through an upgrade of my 1.2.6 application to
2.2.2.
I am almost there but I have hit a problem with ActiveRecord.
Before the upgrade, the following code was working fine.
def create_root(administrator)
root = create_root_collection(self.pingee_name,
administrator,
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 02
2
url_for_file_column not returning correct path
I added this test towards the end of the included
file_column_helper_test.rb that shipped with the file_column plugin:
def test_url_for_file_column_different_root_path
Entry.file_column :image, :root_path => File.join(RAILS_ROOT,
"public/files")
e = Entry.new(:image => upload(f("skanthak.png")))
assert_match %r{/public/files/entry/image},
2006 Mar 23
1
Implementing a model with logging?
Hi,
I''ve been trying to work out a model (let''s say a StudentRecord) which
has a number of attributes, and the key thing I''m trying to do here is
to implement it such that you can actually view modifications made over
time by various users (think of it as a wikipedia style of logging).
Is there some provision in rails that''d provide this functionality for
2012 Nov 08
1
wrap_parameters and Single Table Inheritance
I''m using wrap_parameters and ActiveRecord''s single table inheritance
pattern.
I have a base class "Entity", and two types derived from it: "Person" and
"Group".
What I''d like to do is PUT a Person or Group object to
EntityController#update.
Unfortunately, this causes wrap_parameters to wrap for type "Entity"
instead of
2006 Jul 18
1
Saving an ActiveRecord object
I get this error when I try to save an object that extends of
ActiveRecord:
NoMethodError in TeamController#add_player
You have a nil object when you didn''t expect it!
The error occured while evaluating nil.keys
....
....
#{RAILS_ROOT}/app/models/player.rb:17:in `create_player''
#{RAILS_ROOT}/app/controllers/team_controller.rb:53:in `add_player''
And my Player model
2005 Oct 17
8
Using active record for SELECT MAX(column) FROM ...
Hi,
Is there an easy way of querying an active record for a maximum column
value? I need to do queries like:
SELECT MAX(salary) FROM employees
TIA,
Jeroen
2009 Mar 03
2
Passing an SQL fragment in AR save
I have a basic model class TestTime with no customization.
class TestTime < ActiveRecord::Base
end
I would like to pass the following SQL fragment as part of an AR save
call to TestTime objects. How and where would I do this in the model?
"set c_time=current_time"
(current_time is an SQL method, not a variable).
--
Posted via http://www.ruby-forum.com/.
2008 Feb 25
1
NoMethodError: undefined method `<=>' for :zip:Symbol
...following (abbreviated) error:
NoMethodError: undefined method `<=>'' for :zip:Symbol
from C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/
active_record/base.rb:2177:in `sort''
from C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/
active_record/base.rb:2177:in `attribute_names''
from C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/
active_record/base.rb:2458:in `clone_attributes''
...
Why is the method ''<=>'' being attempted on the zip field?
--~--~---------~--~----~------------~-------~--~----~
You received this message bec...
2010 Apr 20
13
why is ActiveRecord tying to select nonex ID column?
I''ve loaded (and updated) thousands of these MeteredUsage records. In
the middle of a run, I suddenly get:
ActiveRecord::StatementInvalid: Mysql::Error: Unknown column ''id'' in
''where clause'': UPDATE `metered_usages` SET `cost` = 12603.46 WHERE `id`
= NULL
I can''t see anything that''s different about this particular record
compared to
2011 May 06
5
write object array value to csv file
I have an object array @keywords = Keyword.find_by_sql(sql). Now I need
to write all values of @keywords to a csv file, and because the sql
statement is dynamically generated, hence the attribute names are
dynamic too. How can I do it?
Please help!
Thanks!
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on