Displaying 20 results from an estimated 1000 matches similar to: "help with relationship"
2006 Apr 10
4
has render_component changed?
I have an application that worked fine, but after the recent updates
has broken in some calls to render_component from views. I might be
missing something but as far as I remember Rails updates is the only
thing I''ve done in between. See the log:
*** START LOG SNIPPET
Start rendering component ({:params=>
{:center_id=>10, :id=>25},
2011 Feb 17
1
(no) new join table entry by collection_select
Hi there
../view/trainings:
in my _form.html.erb I use a collection_select to get the id of a
worker from Worker-table.
<%= collection_select(:worker, :id, @workers, :id, :first_name,
options ={:prompt => "Select a worker"}, :class =>"worker") %></div>
The collection select shows correct, but there will be no entry in the
worker_id field of the new entry.
2023 Mar 28
1
[PATCH v6 11/11] vhost: allow userspace to create workers
For vhost-scsi with 3 vqs and a workload like that tries to use those vqs
like:
fio --filename=/dev/sdb --direct=1 --rw=randrw --bs=4k \
--ioengine=libaio --iodepth=128 --numjobs=3
the single vhost worker thread will become a bottlneck and we are stuck
at around 500K IOPs no matter how many jobs, virtqueues, and CPUs are
used.
To better utilize virtqueues and available CPUs, this patch allows
2006 Mar 08
4
unless connected? + multiple databases
Hello all.
I am still having fun with multiple databases. In this case it is the
unless connected? statement.
ActiveRecord::Base establishes a connection that is inherited by the
majority of my models. However one Model (Componentlog) that uses a
separate DB is coded as:
unless Componentlog.connected?
establish_connection(
:adapter => "oci",
:database =>
2023 Apr 10
1
[PATCH v6 11/11] vhost: allow userspace to create workers
On Wed, Apr 5, 2023 at 7:08?AM Mike Christie
<michael.christie at oracle.com> wrote:
>
> On 4/4/23 3:00 AM, Jason Wang wrote:
> >>
> >> -static void vhost_worker_free(struct vhost_dev *dev)
> >> +static void vhost_worker_put(struct vhost_dev *dev, struct vhost_worker *worker)
> >> {
> >> - struct vhost_worker *worker = dev->worker;
2023 Mar 28
12
[PATCH v6 00/11] vhost: multiple worker support
The following patches were built over linux-next which contains various
vhost patches in mst's tree and the vhost_task patchset in Christian
Brauner's tree:
git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git
kernel.user_worker branch:
https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git/log/?h=kernel.user_worker
The latter patchset handles the review comment
2023 Apr 13
1
[PATCH v6 11/11] vhost: allow userspace to create workers
On 4/12/23 2:56 AM, Jason Wang wrote:
>> I can spin another patchset with the single ioctl design so we can compare.
> So I'm fine with this approach. One last question, I see this:
>
> /* By default, a device gets one vhost_worker that its virtqueues share. This */
>
> I'm wondering if it is better to have a vhost_get_worker() to return
> the worker_id of a
2023 Apr 14
1
[PATCH v6 11/11] vhost: allow userspace to create workers
On Fri, Apr 14, 2023 at 6:36?AM Mike Christie
<michael.christie at oracle.com> wrote:
>
> On 4/12/23 2:56 AM, Jason Wang wrote:
> >> I can spin another patchset with the single ioctl design so we can compare.
> > So I'm fine with this approach. One last question, I see this:
> >
> > /* By default, a device gets one vhost_worker that its virtqueues share.
2006 May 05
11
Rails Recipes or AWDWR 2 ?
Hi,
I bougth the Agile Web Development with rails First Edition and now want
buy rails recipes but what is the best decision buy rails recipes or the new
edition de Agile Web Development With Rails?
Jean Carlo Schechnner
www.idvirtual.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2023 Apr 12
1
[PATCH v6 11/11] vhost: allow userspace to create workers
On Wed, Apr 12, 2023 at 6:15?AM Mike Christie
<michael.christie at oracle.com> wrote:
>
> On 4/10/23 10:00 PM, Jason Wang wrote:
> >>> vhost_zerocopy_callback(). But since you want to limit the call before
> >>> set_backend, another question comes, do we really need the dynamic
> >>> attaching/creating in this case? How about a simple one ioctl that
2005 Dec 28
2
How write input form (layout/controller) so I can enter Id
I reformulate my needs. How I can write (layout/controller) so I can
read value of Id from the new form when creating new record.
With following structure:
CREATE TABLE words (
id INTEGER PRIMARY KEY,
word VARCHAR(40)
);
I want enter new records like:
id=47812, word=''pes''
id=1382, word=''krough''
id=67145, word=''brum''
--
2007 Dec 28
2
Arity?
Hello,
First off, nice improvements hemant! Thanks for all the hard work. I
just whipped up a new worker for a scheduled job that sends digest
emails. Very smooth.
However, moving some of my old backgroundrb into new backgroundrb
isn''t going quite as smoothly. I have a import worker that takes a
number of parameters and then is started dynamically. Here''s the a
2006 May 30
0
Single table lookups
I''m struggling with a single table type (self) lookup.
my ''personnel'' model has a supervisor_id and is_supervisor column.
The supervisor''s select list is created by
@supv = Personnel.find(:all,
:conditions => ["is_supervisor = true"],
:order => ''last_name'')
in my personnel model, I have the following...
def
2009 Mar 25
11
ActiveRecord: Nested :include erroneous behavior
Hi,
Found a simple example breaking on moving to 2.2 from 2.0. This
example illustrates the usage of nested :include finder options.
class Book < ActiveRecord::Base
has_many :distributors
end
class Distributor < ActiveRecord::Base
belongs_to :book
has_many :agents
end
class Agent < ActiveRecord::Base
belongs_to :distributor
has_many :shops
end
class Shop <
2006 Dec 07
17
compress and max upload size?
I am using mongrel_cluster with mod_proxy_balancer and would like to
enable compression (assuming it improves throughtput) and limit file
size upload. I configured mod_deflate and LimitRequestSize in Apache,
but in my trials looks like the proxied calls bypass those directives
(the conf goes below).
Is there a way to get this?
-- fxn
# Adapt this .example locally, as usual.
#
# To be
2006 May 24
7
migrations and SQLite
I read in the instructions of Tracks that "upgrading via the rake
migrate command is quite a bit more tricky currently with SQLite and
SQLite3". Is there any gotcha regarding migrations and SQLite3?
-- fxn
2012 Aug 17
3
Rails doesn't validate create_model or build_model (has_one association)
I''ve got User has_one Shop. Rails is not validating when I tried
create_shop or build_shop, neither in the browser nor the rails console.
My code:
class Shop < ActiveRecord::Base
attr_protected :user_id
belongs_to :user
validates_presence_of :name, :primary_address, :city, :country_code,
:currency
end
class ShopsController < ApplicationController
before_filter
2006 Mar 07
4
should a AR object be able to see backwards?
I have two models, Stop and Station, they relate one station to many
stops.
Stop has_one :station
Station belongs_to :stop
So I can do @station.stops, but I cant do @stop.station, is this right?
For example in the view I have:
<% for @stop in @stops %>
<tr>
<td><%= @stop.station.name %></td>
<td><%= @stop.time.hour.to_s + '':''
2012 Oct 16
2
unique
Hello everybody,
I've got a problem concerning the function unique. I have got a
data.frame "shopdata" with 1000 shop which were evaluated at different
points in time.
With function subset I chose those shops with more then 10 employee and
store it in data.frame "bigshopdata" with 700 shops.
bigshopdata=subset(shopdata, shopdata$employee>10)
Now I use
2013 Nov 06
6
Feature: make capitalization optional in *humanize*
According to the documentation<http://api.rubyonrails.org/classes/ActiveSupport/Inflector.html#method-i-humanize> of
ActiveSupport::Inflector:
*humanize*(lower_case_and_underscored_word)
Capitalizes the first word and turns underscores into spaces and strips
a trailing “_id”, if any.
* Example: humanize("employee_salary") # => "Employee salary"*
I would