Displaying 20 results from an estimated 3000 matches similar to: "belongs_to trigger on update?"
2005 Dec 29
7
belongs_to causing NoMethodError exceptions ... ?
I''ve got a really strange problem using belongs_to. I apologize in
advance for the length... this is going to take a while to explain.
Basic idea: Creating a User requires that the user enter an email
address and activation key that matches an existing PendingUser.
After creating the user successfully, that pending user should be
marked as "used".
The problem:
When I
2020 Jan 21
2
imap panic: file array.c: line 10 (array_idx_modifiable_i)
Hello,
I just migrated a few dovecot IMAP mailbox (Maildir format) from a Dovecot 2.1.7 (Debian 7) mailbox server to a Dovecot 2.3.4 (Debian 10) mailbox server and one particular mailbox does not work properly and generates the following error log entries:
Jan 21 09:39:21 Panic: imap(EMAIL_ADDRESS)<7741><UTsrWKKcasoAAAAAAAAAAAAAAAAAAAAB>: file array.c: line 10
2020 Jan 27
3
imap panic: file array.c: line 10 (array_idx_modifiable_i)
Hello,
Does anyone one have any idea? Aki maybe?
Regards,
Mabi
??????? Original Message ???????
On Wednesday, January 22, 2020 11:37 AM, mabi <mabi at protonmail.ch> wrote:
> Hello,
>
> Are there any chances that I could fix this issue by running a "doveadm force-rsync" (https://wiki2.dovecot.org/Tools/Doveadm/ForceResync) on this problematic mailbox?
>
> Best
2006 May 19
2
Problem with joins and overlapping field names
Hi,
I have the following code:
@conversation_pages,
@conversations = paginate(:conversations,
:per_page => 20,
:joins => ''LEFT JOIN messages on
messages.conversation_id = conversations.id ''+
''LEFT JOIN email_addresses on
2006 Mar 14
4
validates_confirmation_of has stopped working
Hi Railers,
I''m past considering myself a noob in Rails land - I think what I''m up against
here is more of a bug or an anomaly that I''m unaware of (or that has changed
in a recent version).
I had a fully working validates_confirmation_of :email_address field in my app
- was one of the first things I set up, extremely simple, been working for a
long time.
Then one
2006 Feb 21
1
Custom forms and fieldWithErrors tags
Hi,
(probably) A newbie questions:
I have a form where a user can choose an email address, but there are only
some choices for the domain, so I wrote a helper where the local part of the
email is a text field and the domains is a dropdown list, like:
Select Email: [ my_name ] @ <domain.com>
..which I defined as a helper:
def email_form(tagname, domain_list)
2006 Apr 14
1
Validating Existing Models
I''ve got a user object which has quite a few attributes mapped to the
database. As of right now I''ve got some validations in the model like:
validates_presence_of :password, :message => "You must specify a valid
password."
validates_confirmation_of :password, :message => "Password doesn''t match
the confirmation."
validates_presence_of
2006 Oct 24
1
converting from courier questions
I currently run postfix and courier on my mail servers with squirrelmail.
The problem with courier is it seems to run so slow. The webmail takes
forever to load if you have many mails. I have this set up in virtual
domains with all longin and path info in an mysql database. I just joined
the list and DID google before asking, hope this isn't a common question.
With courier it looks for a
2006 Jul 27
2
Creating multiple objects from form data
I''m in the process of creating a sign up form for an online application.
The form collects account info, company info, and then info for an
administrative user.
The method looks like this:
def create
@account = Account.create!(params[:account])
@company = @account.companies.create!(params[:company])
@user = @company.users.create!(params[:user])
end
However, this inevitably fails
2006 Jan 30
5
Action Mailer woes
Hi gang,
Im having my first stab at ActionMailer and not having any luck. Perhaps
someone could help me out.
I generated a a mailer called ItemMailer - its purpose is to take some
information that I''ve already gathered in a ToDo list form and to mail
it out to the person who is nominated for the task
In environment.rb I have;
ActionMailer::Base.server_settings = {
:address =>
2006 Nov 04
1
ActionMailer Sending Two text/plain Parts
Hello ~
I have a working ActionMailer Action that takes the template to use as
an argument so I have one action that handles multiple emails. The
email sends just fine, and the correct email templates are used, but
ActionMailer is throwing in its own text/plain section in addition to
the one I specify. Does anyone have any ideas on why this might be
occuring, when I am specificially specifying
2007 Jun 24
6
I only want one type of model returned from a multi_search
I am trying to use acts_as_ferret''s multi_search to search across
multiple models, but i only want it to return one type of model.
for example i have a page that lists out people. on this page it shows
email addresses and phone numbers. I want to be able to search by any
fields directly from the person model and search the fields from the
email_address and phone_number models, but I only
2006 Nov 01
3
active_record_base_without_table plugin - Easily use models without tables
Hi all,
Here''s another little plugin I wrote to use AR models without tables. It''s
dead simple, just extend from ActiveRecord::BaseWithoutTable instead of
ActiveRecord::Base:
class Contact < ActiveRecord::BaseWithoutTable
column :name, :string
column :email_address, :string
column :message, :text
validates_presence_of :name, :email_address, :message
end
2007 Feb 01
6
Using a nonstandard foreign key
Hopefully this is an interesting question.
I have a "user" table with a field "email_address". I would like the
part of "email_address" after the ''@'' to be a foreign key to a
"companies" table populated by a companies that are clients.
Any pointers on how to do this in rails?
--~--~---------~--~----~------------~-------~--~----~
You
2006 Jan 16
0
belongs_to with has_and_belongs_to_many
I''m having a problem with belongs_to and has_and_belongs_to_many.
Here''s a brief summary of the models involved:
class Member < ActiveRecord::Base
set_primary_key ''member_id''
has_and_belongs_to_many :projects, :join_table => ''projects__members''
has_many :projects, :foreign_key => ''created_by''
end
class
2007 Feb 20
4
Best way to implement syntax sugar?
Hi!
I''m *very* new to rails, I just dove in about a month ago and I''m
loving it.
One thing I decided I immediately wanted to do, was shorten the
number of keystrokes neccessary to URI, HTML, or Jscript encode something.
The project I''ve come into already has helpers defined for this.
Right now, what I''ve done is:
alias h! string_esacpe_html
alias u!
2006 Jan 31
4
A dumb question on extracting a value from a hash
Hi,
I have the following code fragment;
@comm_type = Communication.find_by_sql(''select id from
communication_types where upper(description) = "EMAIL"'')
Which results in
>> @comm_type
=> [#<Communication:0x39a0f60 @attributes={"id"=>"4"}>]
But when I try to test an ActiveREcord against this it doesn''t work;
2008 Jan 11
5
Missing methods
We have a custom implementation of the Mother Object idea. It''s inside
of a module, basically like this:
module Factory
%w(account friendship person invitation message asset email_address
birth).each do |klass|
eval <<-EOF
def self.create_#{klass}(attributes = {})
default_attributes = valid_#{klass}_attributes
#{klass.camelize}.create!
2006 Feb 22
15
Fixtures and Relationships
In my daily development, I migrate back and forth between versions, and
often do: rake load_fixtures...
... in order to populate my development database with fun data.
Now, with any HABTM relationship, there are failures, as there is no way to
say "which" fixtures to load first.
Within an actual functional or unit test case, you could simply load them in
the proper order, but
2007 Aug 21
3
Eager Loading
is there a way to always eagerly load an associated object so that you
don''t have to put :include into every finder?
class Product <ActiveRecord::Base
belongs_to :user #always load user when product is loaded
end
Product.find(1).user.login
#1 query since user was loaded with the product, same as if i
used :include but I don''t want to have to specify it everywhere.