similar to: active_record_base_without_table plugin - Easily use models without tables

Displaying 20 results from an estimated 3000 matches similar to: "active_record_base_without_table plugin - Easily use models without tables"

2007 Oct 23
11
validates_confirmation_of not working?
I just can''t get validates_confirmation_of working for the life of me!... It''s not the first time I''m having problems with it but I just never understand why!... This time I pretty much followed *exactly* the example in Agile Rails Development and still...it just won''t work! I put 2 different passwords in the form and it doesn''t trigger an error,
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
2006 Jun 27
4
Not Active Record Model Validation
I have a problem with ruby on rails validation total_book_toy.rhtml ================ <%= text_field ''book1'', ''title1'' %> <%= text_field ''book2'', ''title2'' %> I want to validate these text_field so user can''t insert same title. However, I was stuck how to do it. Or maybe you have another way how to do it.
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 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
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 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 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 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 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 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
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
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
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;
2007 May 16
1
belongs_to trigger on update?
This may be a rails bug, but I can''t figure out how to do attribute overrides for the attribute created for a belongs_to relationship I have a simple relationship: User belongs_to Domain User has a property email_address which I want to update if Domain is ever changed I tried in User def domain=(new_domain) super end but now the ability to assign new domains is totally
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!