Displaying 20 results from an estimated 120 matches similar to: "Contextual Associations"
2006 Feb 11
3
Creating new object using params posted from form
Hi,
I have a problem creating an new instance of an object using params posted
from a form.
The object being created is not a sub class of ActiveRecord and is very
simple. It''s model file is just:
class Search
attr_accessor :major_build_id, :minor_build_id, :environment_id,
:system_id
end
The controller creates an empty instance variable the first time the page is
called, else
2011 Nov 20
2
Foreman API, problem when creating hostgroups
I am trying to create a hostgroup using the Foreman API
(foreman-0.4-0.1rc1.noarch):
Using perl v.5.14.2, REST::Client et. al., ending up with sending:
POST /hostgroups
{"name":"api-created-
2009 Feb 20
6
How to mock an object defined in the before_filter function?
Hello,
I am trying to implement the following scenario, but I am stuck ...
The thing is I want to initialize a variable @comment when the stub
function "find_comment" is called.
The way I do it below doesn''t work, since
"before_filter :find_comment" returns true/false and @comment
initialization is done inside it. Could you please give me a hint how
to do it?
One
2007 Nov 12
7
schema_info always wants to be 3, even when set to 7
Hi all,
I''m having a very odd problem with db:migrate. I''m using Rails 1.2.5
on Windows XP SP2 and Ruby 1.8.6
I have seven migrations. If I run them with an empty database, it
runs the first three, then halts. When I look in schema_info, the
version is 3.
If I run db:migrate VERSION=7, then it runs through the remaining 4
migrations, and the version is 7 in the DB.
2007 Apr 26
1
mapping column names in legacy schemata
I have a legacy MySQL database with a weird naming convention - all
table and column
names have a prefix ''_'' , which is annoying, and some of the column
names are misnomers.
I would like to apply a pre-defined mapping between MySQL column names
and method
names to be used in the Ruby class, without having the original column
names being visible anymore.
how can I pre-define a
2006 Jan 10
5
Select Tag and Associations
Hi there,
I''ve been working on this for awhile and have finally decided to ask
for a little guidance.I have a slight problem trying to save a
selection.
I have two models:
A "Posting" has_many "Categories", and a "Category" belongs_to one
"Posting". With that said, in the posting model I have "has_many
:categories" and within the
2006 Jun 03
6
Calculating row COUNTs
hi everyone,
I''m trying to do a simple calculation in my rails project. I would like
to find all rows in a table that match the given id of another table
(ie. comment_id) and has the value = 1 ("value" is a field in the
table), then add those values up. Next find the same rows with the
value = -1 and add those values up also. Finally, I would like to find
the total.
2012 Jan 05
3
composite keys and association
i have two table, comment and post, both have composite keys, and no id
column, comment belongs to post, i follow the instruction of
http://compositekeys.rubyforge.org/, and it seems successfully,
(But i still cant confirm to put require ''rubygems'' and
require ''composite_primary_keys'' on which file ).
I can do the CRUD operation for post,then i want to create
2019 Oct 02
2
CentOS 8 Broken Installation
On 10/2/19 9:47 PM, Jonathan Billings wrote:
> On Oct 2, 2019, at 3:39 PM, Ljubomir Ljubojevic <centos at plnet.rs> wrote:
>> Richard on CentOS-devel mailing list has similar problem but suggests it
>> might be issue only with CentOS, he says he had to add the kernel line
>> to make it work.
>> Name of the tread is:
>> [CentOS-devel] Booting CentOS 8 in a VM
2003 Jun 04
3
SPOOLSV and XP PRO
Hi All
I recently began having issues where there would be a runaway SMBD
process listed in TOP, having a Pri of around 25, and using 70 to 95%
CPU indefinitely.
IPTRAF reports around 600kbps constantly in and out from the subject
workstation, with nothing going on - on the workstation. This traffic
is parallel to the runaway SMBD process ... the traffic dies when the
SMBD process is
2006 Apr 20
5
Integrating with Legacy Databases
This seems like it must have been asked before - I really _did_ try to
find it in the archives, so my apologies if it''s already out there.
Utilizing ActiveRecord, I would like to specify a prefix for the
column names in my table. For example, in ''Recipe 16 Integrating with
Legacy Databases'' (Rails Recipes, from PragProg, by Fowler) they deal
with integration with a
2010 Jan 27
2
has_many, through with nested models?
First the data model:
class Forum < ActiveRecord::Base
has_many :topics, :dependent => :destroy, :order => ''created_at
desc''
end
class User < ActiveRecord::Base
has_many :topics, :dependent => :destroy
has_many :comments, :dependent => :destroy
has_many :replies, :dependent => :destroy
end
class Topic < ActiveRecord::Base
belongs_to
2019 Oct 02
3
CentOS 8 Broken Installation
On 10/2/19 9:27 PM, Jonathan Billings wrote:
> On Oct 2, 2019, at 15:14, G?nther J. Niederwimmer <gjn at gjn.priv.at> wrote:
>>
>> Hello,
>>
>> Is it a Plan to correct the Broken mdadm and or driver for Intel Chipset C602,
>> my Server SuperMicro Board X9SRi-F have a Problem with the new C8 or RH8 ?
>
> Is there a bug filed on
2006 May 15
33
acts_as_commentable release
I now have the acts_as_commentable plugin up on RubyForge. This
plugin will allow you to add comments to any active_record object in
your Rails application.
So far the directions are simple, and there are only a few features:
To install:
ruby script/plugin install
svn://rubyforge.org//var/svn/commentable/acts_as_commentable
In the readme there is a sample migration you will need to use, with
2006 Nov 23
0
Two repeatable crash bugs in Ferret proper
Hi guys! Been reading this list for a while.
I have two repeatable Ferret crash bugs, both seg faults.
1. The first bug appears to seg fault Ferret when you use quotes in a search
argument (eg ''file_name:"file name"'')
2. The second bug appears to seg fault Ferret when you attempt to index text
with very long tokens (above 256 chars). It may have something to do with
2009 Mar 11
12
Eager loading comments associated with user submissions.
Hey everyone,
I am working on an application that allows users to submit articles,
and also comment on those articles. Pretty much exactly like Digg.
Everything works fine except that when there are a lot of comments
there are a lot of database queries to both fetch the comments and the
users who posted those comments. I have used eager loading in other
parts of my application to reduce the
2007 Apr 26
0
ActiveRecord: mapping column names when using legacy schemata
I have an ActiveRecord question...
I have a legacy MySQL database with a weird naming convention - all
table and column names have a prefix ''_'' , which is annoying, and
some
of the column names are plain misnomers.
I would like to apply a pre-defined mapping between MySQL column names
and method names to be used in the Ruby class, without having the
underlying
column names
2009 Oct 05
1
Re: creating 2 things at the same time?
Hi Mike Chai
What I understood is you have relations like
comment has_one picture
picture belongs_to comment
As an example
comment name:string
picture name:string,comment_id:integer
So do as below
in comments_controller new action
@comment = Comment.new
@comment.picture = Picture.new
Now in view/comments/new.html.erb
<% form_for(@comment) do |f| %>
<p>
<%=
2002 Mar 06
1
Antwort: Re: Spoolss permissions, NT & XP print driver misery (2.2.2/2.2.3a/2.2.4pre)
Hi Jerry,
Thank you for this statement! ... the problem in the last days/weeks was,
no infos from the team members!
It is no big problem if something is not working. But, if we are making
tests and reports bugs/problems and so on ... And no one from the team
give a answer ! This will make us crazy, too.
You and all of the team members make a great job!
... we will see us in Goettingen!
2009 Feb 27
0
Contextually aware controllers
Hi everyone, my CMS app is starting to get quite large. I have heaps
of modules (about 15) and some of these modules are re-used within
different contexts:
An example is that you can add a Page to the schools website, but you
can also add a page to a ''Learning Cave'' which is our online learning
area for kids. While all the controller and view code is essentially
the same, we