Displaying 20 results from an estimated 10000 matches similar to: "Editing N instances of a model on one page"
2006 Jan 05
2
Confused...
Ok,
So, I''ve got two data tables associated through a foreign key.
class Child < ActiveRecord::Base
belongs_to :parent, :class => Parent, :foreign_key => "parent_id"
# also has attr1, attr2
end
class Parent < ActiveRecord::Base
has_many :children, :class => Child, :foreign_key => "parent_id"
end
So, I''m trying to build the new/edit
2006 Jan 02
3
SwitchTower 0.10.0
SwitchTower is a utility that can execute commands in parallel on
multiple servers. It allows you to define tasks, which can include
commands that are executed on the servers. You can also define roles
for your servers, and then specify that certain tasks apply only to
certain roles. It was developed primarily to ease the pain of
deploying Rails applications to multiple machines, but can
2006 Jul 27
7
WebService
Hi all!
how do I make a WebService using rails?
thaks !
--
Cordialmente,
Carlos J?nior <junior@boanoitebh.com>
(31) 9244-6543
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060727/f52d1e1c/attachment.html
2006 Jan 01
11
Migration db_schema_import always fails.
I have not been able to get DB migrations to work at all in Rails 1.0
for me. On multiple platforms I continually get the same errors. It
took me awhile to figure out some initial things, such as Migrations
don''t seem to support Enum column types, and doesn''t really support
Foreign key relationships (the constraints at least). After changing
my DB schema to jive more with the
2005 Dec 29
7
Laszlo on Rails kicking off
The Laszlo on Rails effort, bringing the rich web interface of
OpenLaszlo (http://openlaszlo.org) to the simplicity of Rails
(http://www.rubyonrails.com) will be kicking off next week.
We have a list going at
http://groups.google.com/group/laszlo-on-rails/ -- 88 people so far
and we haven''t even begun! -- but if you really want to be close to
the action, email me with your firstname,
2005 Dec 16
6
managing belongs_to fields in a form
Hi all,
I cannot find a clean way to create/edit an object that ''belongs_to''
another one, just by using form fields.
I always need to explicitely unassemble it, store the master id in a
hidden field, and then refetch the master from its id, and put it back
in the object.
To summarize:
I want to create a new member, for a given project
@project= ...
@member =
2013 Oct 03
2
Idiom for throwing an error if a command fails
Hi,
What''s the best idiom for executing a command on every Puppet run and
triggering an error if the command fails?
For example, the following code throws an error if the machine has anything
other than 8 cores.
exec { "echo ''This machine does not have 8 cores!''; exit 1":
unless => "facter processorcount | grep -q 8",
}
The ";
2006 Jan 30
6
Looking for better code
Hi, I''ve been programming in RoR for about a week or 2-3, and I like it
very much.
Now, I have a certain problem that is very complicated, well for me at
least :-)
I have 3 database tables:
recipes
ingredients
and another one which binds the previous 2 tables together
Now, I want to have an input form where you can insert 1 recipe and a
certain amount of ingredients, say 5.
What do
2006 May 09
3
validations erasing the form
Hi there
I have a for with a couple of text_fields. I''m doing some validation
via the model and when the validation "works" I get there was an error
on blah blah
the problem is the form is erased and I have to fill up the form again!
I saw that scaffold keeps the form filled when the validation "works"
but I dont know exactly what''s making it happen!
I would
2007 Apr 16
6
How to use a form.check_box ?
Hey guys,
I''m trying to have a simple webform in my administration section to
add a user. I have the text_fields for adding the user''s name,
password, and password confirmation, but cannot seem to figure out the
checkbox. I want it to be a single checkbox, that if clicked, will set
the database column "access" to be "admin" and if its unchecked, set
it to be
2008 Jan 02
6
problem when editing record in polymorphic relation
I have the following three models created applying the polymorphic
concept
==========================================================================
class SoftwareCi < ActiveRecord::Base
has_one :ci, :as => :content
end
class HardwareCi < ActiveRecord::Base
has_one :ci, :as => :content
end
class Ci < ActiveRecord::Base
belongs_to :content, :polymorphic => true
end
The
2007 Jul 25
5
editing multiple models in one form
Very new to this but would appreciate a hand as this is driving me mad,
I''m trying to update both degree and assigned from a single form, the
degree section updates fine but assigned just retains the same values,
any help much appreciated!
my edit.rhtml file looks like:
<h1>Editing degree</h1>
<%= error_messages_for :degree %>
<%= start_form_tag :action =>
2006 Mar 23
8
DRY principle - how to implement?
Hi all!
I have ''send_status'' table which looks something like these:
id code title
1 sent Sent
2 error Sending error
3 success Success
Next I would like to associate some processed records with their
''send_status''. Is it better to use:
1)
record.status_id = SendStatus.find(:one, :condition => "code=''sent''").id
to
2006 May 18
3
populating array of text_fields from an array of model objects
I have in my view the following:
<% 0.upto(@num_performances) do |idx| -%>
<%= text_field ''performance'', ''city'', :index => idx, %>
<%= text_field ''performance'', ''venue'', :index => idx, %>
<% end -%>
and in my controller I have:
@performance = [Performance.new("city" =>
2006 Jun 28
3
couple newbie questions
Hello Folks,
I am starting out with RoR and just browsed through Dave''s book ? couldn''t
stop reading. I started building a prototype to get better hands on
experience and I have run into two simple issues that I am hoping will be a
quick answer for some of you experts out there.
*Issue 1:*
>From within a "companies" controller and list_companies.rhtml view
2010 Oct 31
3
msg:install the Windows version of Mono to run .NET executab
Hi Wine friends
I am trying to install the genie windows software using wine 1.2.1
During the first attempt I recieve this first msg:
install the Windows version of Mono to run .NET executables
and some lines later this second msg:
err:rpc:I_RpcGetBuffer no binding
Ok. After googleing I found the two msgs are related and the only way I could find to fix it was to install the mono26 using
2006 Jun 01
5
History plugin
Hello,
I felt annoyed enough when having to redirect user back to their
previous location in a hackish way that I wrote this plugin.
It avoids storing POST and Ajax request. It also has a facility to
specify actions not to store in the history.
If you are interested, it''s there:
http://blog.cosinux.org/pages/rails-history
See you all,
Damien
--
Damien MERENNE
2006 Jan 23
16
Adding form fields (extending a form) on the fly
Hello,
I just can''t seem to find a way to extend a form dynamically in ROR.
Say I am writing a recipe website. There is one form to enter the
recipe. There is room for N number of ingredients (let''s say a text
field for each ingredient name and selection list for the amount). What
if the user wants to add more than N ingredients as he types them in?
how do I do this without
2006 Feb 04
22
What''s the best way to embed a form?
I would like to embed my login form on my app''s home page. What''s the best way to render the login action of member controller from another action?
Thanks
Frank
---------------------------------
Relax. Yahoo! Mail virus scanning helps detect nasty viruses!
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Aug 13
3
why do text_fields appear smaller in IE than other browsers?
In testing my application on different browsers, I''ve noticed a few
differences:-
a password_field :size=>20 is smaller than a text_field :size=>20 on
Internet Explorer. They are the same on Firefox and Safari. makes my
login box look silly. the same can be seen on the login screen for this
forum. the password box is a little shorter on IE6.
more annoying however is I have