Displaying 20 results from an estimated 9000 matches similar to: "indexing for sub items appears to fail after validation failureq"
2009 Jun 20
0
[Rails 2.3] nested_attributes and validation of nested model
Hi,
I''m using nested models to create form in my view. It looks like this:
<% form_for :user, :url => {:action => "add_owner" }, :html => {
:method => :post } do |u| %>
<li><label>Name: </label><%= u.text_field :name %></li>
<li><label>Surname: </label><%= u.text_field :surname %></li>
<%
2009 May 06
1
WinXP user password not accepted - very strange !!!
Dear friends,
I have an Ubuntu 8.04 server fully updated running Samba 3.0.28a. Currently the ubuntu machine acts as a PDC and all clients have joined the domain successfully (clients are all WinXP SP2).
The strange thing is only with one user where:
If the user logs in with his password all works well. If he restarts or shutdown his machine and tries to relogin the system tells him that his
2006 Jun 20
2
Validation error_messages_for problem
I am having trouble getting error_messages_for to work.
My controller(relevant parts) looks like
def configure
@account = session[:account]
@user = User.new
end
def add_new_user_to_account
@user = User.new(params[:user])
if @user.valid?
session[:account].users << @user
end
redirect_to :action=> ''configure''
end
end
and my
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.
2005 Dec 31
2
Validation errors not displaying and will not save
Hello all,
I''m fairly new to rails so I''m probably doing something really stupid
here.... I have been banging my head at this for hrs now... I''ve tried
so many different things and nothing seems to get me any further...
I am trying to create an image uploading page that will simultaneously
create thumbnails to separate file directories and update the database
via
2005 Dec 15
12
Adding multiple invoice items to an invoice on the same form
Hi Friends ,
Got a unique requirement .I am designing a invoice printing system
.So right now I have the NEW page for adding the invoice details to the
table .Now I have the requirement of adding Invoice Items In the same
form .I have added multiple text boxes to enter the values of the Items
using
<%= text_field ''invoiceitems[]'', ''item_price''
2006 Jul 05
0
Javascript repeating fields.
The one area I keep hitting my head against in Rails is repeating fields via
javascript. I frequently have forms where one or more fields are actually
broken out into sub tables because there can be multiple simultaneous values.
Rails seems to want to you to use the [] construct in the form helpers (e.g.
text_field(''employee[]'', ''name'')), but I can''t
2006 May 29
1
validation in a "subform"
I''ve been following the rails/osx tutorial at
http://developer.apple.com/tools/rubyonrails.html
This develops a simple application with expenses and accounts.
Near the end of the tutorial, there is a view which allows expenses to
be added to an account.
This view has the "parent" @account rendered, then iterates throught
@account.expenses to display the existing accounts,
2006 Aug 31
1
Peculiar validation error: undefined local variable or method 'fieldWithErrors'
Hello all,
I''m submitting a form with the following field -
<%= p.text_field :postcode, {:class => ''inputMedium''} %>
and on submitting the form I am getting this error -
NameError in Property#create
Showing app/views/property/sell.rhtml where line #52 raised:
undefined local variable or method `fieldWithErrors'' for #<Object:
0x1de968>
2008 May 08
0
stub sub partials when testing partial with rspec
Hello all
I prefer to use many partials. It makes my code more DRY
Also I use rspec, and when I have to test partial with sub partials I
have a problem.
if I stub render, then my partial will not be rendered. If i do not
stub render it tries to render sub partial (and i don''t need this)
Not very long googling did not bring the answer, so I made very dirty
and IMHO dangerous function
2009 Feb 06
2
Using partials with form_for
hi all
i was wondering whether it is possible to use partials along with form_for
and form_field. following code is not working. is there some error or this
case is impossible..??
*#new.html.erb*
<h1>Enter Details for new Partner:</h1>
<% form_for(@partner) do |f| %>
<%= render :partial => ''form'', :locals => {:partner => f} %>
<p>
2007 Nov 18
2
Issues adding sub-menu items
Hello All,
I''m new to the list and to Ruby.
I was trying to use one of the examples as a skeleton for something that
I''m working on.
I''m currently stuck when it comes to adding another item to the
sub-menus.
I have a menu item by the name of "Tools" and I would like to add a
sub-menu item called "Find Unique Fields" but it doesn''t show up
2006 Jan 30
0
Adding ActiveRecord objects to the session
Hi all,
I am creating an AJAX quoting/puchasing system and I am having a bit of
unexpected behavior when adding ActiveRecord objects to the session.
When I add the ActiveRecord object (in this case QuotePart) to the
session it automatically saves the object that was added to the session
to the DB. And the oddest part is that it automatically fills in the
foreign key field quote_id, even though
2007 Feb 06
0
Call Connections Dropped
We just had the oddest thing happen which worries us as new users.
We had 3 calls running on asterisk (one from sip to sip and the other to
sip to zap). It seemed for no reason, the connections just dropped and
the lines went dead. You couldn't call a phone (not even yourself). Once
I restarted asterisk (it gracefully shutdown and started back up), then
everything worked again.
This concerns
2000 Jun 19
0
Compilation issues on Mac OS X Server 1.2
Majordomo bounces the oddest things.
Monty
------- Forwarded Message
To: vorbis-dev@xiph.org
From: Chris Hanson <cmh@mac.com>
Subject: Compilation issues on Mac OS X Server 1.2
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
I'm trying to build vorbis on Mac OS X Server 1.2 -- aka
powerpc-apple-rhapsody5.6 -- and have had pretty bad luck. But it
2013 Feb 21
0
Odd Error message with rare events logit
I'm running a rare events logit model in R using the Zelig package and am
getting some of the oddest error messages that I can't figure out.
y = rnorm(100)
x = c(rep("0",1), rep("1",99))
d = data.frame(won=x, bid=y)
d
mod1 <- zelig(y~x, model="relogit", data=d, tau=1/100,
case.correct="prior", bias.correct=TRUE, robust=TRUE)
> mod1 <-
2006 Jun 19
3
Parent Child form using Partials
I am trying to make a simple application which consists of contacts and
their addresses.
class Contact < ActiveRecord::Base
has_many :addresses
end
class Address < ActiveRecord::Base
belongs_to :contact
end
I would like to be able to edit/add addresses from within the edit/add
of the contact. I scaffolded the contact and address objects and
modified the contacts/_form partial as
2009 Nov 12
1
Please help me ------ Mapping an item to article
Hi everybody,
I have a form like this
<h1>New menuitem</h1>
<% form_for(@menuitem) do |f| %>
<%= f.error_messages %>
<p>
<%= f.label :title %><br />
<%= f.text_field :title %>
</p>
<p>
<%= f.label :alias %><br />
<%= f.text_field :alias %>
</p>
<p>
<%= f.label
2006 Mar 04
1
validation for items in a 1 2 many
I am populating a table skills which relate to a table cv in a 1 cv to
many skills relationship...
I populate the skills as below;
def new
@session[:cv_id] = params[:id]
@skill = Skill.new
end
def create
@cv = Cv.find(@session[:cv_id])
@cv.skills << Skill.new(params[:skill])
if @cv.save
flash[:notice] = ''Skill was successfully created.''
2010 Jun 10
2
tuning software echo cancellation
We have been distributing asterisk servers for several years now, and early on
decided that hardware echo can was the way to go. Our first few boxes without
it had horrid echo problems, and attempts at tuning in 2006 didn't make any
difference.
We installed a new server yesterday at a client's location with a Rhino 4 port
FXO card (HW EC included), and when an inbound call was