similar to: Model Inheritance, Mixins and Database design

Displaying 20 results from an estimated 100 matches similar to: "Model Inheritance, Mixins and Database design"

2006 Feb 27
1
Models and Inheritance
I have a table of companies and a join table forming the relationship between a list of possible services they can provide. Working from a basic understanding of OOP I assumed that there should be a series of Serviceprovider child objects of the company class. Company < ActiveRecord::Base has_belongs_to_many :services end Serviceprovidertype1 < Company Serviceprovidertype2 <
2004 Jan 10
2
swat error
I am getting the following error when trying to connect to http://localhost:901 500 Server Error chdir failed - the server is not configured correctly Are there any known fixes for this ? Also: I noticed that some of the directives, such as datadir, might be non-functional or ignored elsewhere in coding of swat Could this be the cause of the above errors ? Finally here is the cli output
2009 Nov 06
1
issues with SSOAP when wsdl has ComplexTypes
I recently started trying R and SSOAP and was able to successfully try a "hello world" service. I am now trying to get a more complicated interface to work with SSOAP and so far failed miserably at that and so need any help I can get from here. The service I am attaching is a prototype for a full service that would take information to identify a data source and a query to run and return
2009 Oct 19
2
how to get rid of 2 for-loops and optimize runtime
Short: get rid of the loops I use and optimize runtime Dear all, I want to calculate for each row the amount of the month ago. I use a matrix with 2100 rows and 22 colums (which is still a very small matrix. nrows of other matrixes can easily be more then 100000) Table before Year month quarter yearmonth Service ... Amount 2009 9 Q3 092009 A ...
2009 Jul 11
3
How to disable 3D acceleration
Hi, i'm trying to istall Ikea home planner, but the planning screen shows only black. In some other forum i found a guy who turned 3d acceleration off in VirtualBox and by doing so it solved the problem. That's why i want to give it a try, by diabling 3d acceleration in wine, but don't know how or where i can do it. I know i can just go for VirtualBox, but i don't own any
2008 May 05
7
extract and assign xml values to variable
hi, how can we assign an xml element value to some variable in controller? e.g. if we have <order> <id>1</id> <name>abc</name> <location>xyz</location> </order> and if we want value of name i.e. ''abc'' to be assigned in a variable declared in a controller, say order_controller, like this- temp = "value of xml element
2006 Jan 30
3
webservice consumption over SSL
Hi, as long as nobody answered to my previous question, i''ll try to write in another way. I have: webservice WSDL link (https://something?WSDL, that''s .net webservice) pem file (certificate, needed to authentificate for gettting data) i need : to consume that webservice without describing API''s for each method (i mean use WSL to construct needed structures or objects).
2013 Feb 27
1
Point a Digium phone to a configuration URL using mDNS without DPMA or DHCP option 66
I have the following scenario. A small network has DHCP but does not publish option 66. An Asterisk server is on the network, but the Asterisk version does not support DPMA and it is hard to switch the version. However, there is a possibility to have a web server and an mDNS (Avahi) server. I have been reading about provisioning Digium phones without DPMA, and it mentions that option 66 can
2007 Nov 21
4
Builder::XmlMarkup adds <inspect/> on printing and <clone/> on saving
Hello, I am new in this group. Please give me a short hint, in case this is the wrong place for my posting. I want to create an XML file and store it in "filetransfer". The XML part of the file (the body) sould go to "filetransfer.data". Despite the last line, everything is fine with the code below. With "filetransfer.save" two entries "<clone/>"
2019 Nov 21
7
[PATCH 0/2] Fixes and tweak to the installation of qemu-ga MSI
This, together with the changes to common repo are fixes to the installation qemu-ga MSI. There is still an issue that I did not figure yet how to fix. On Windows 10 it fails to register the QEMU-GA service. Tomáš Golembiovský (2): windows: fix detection of qemu-ga installer on RHV windows: small tweaks of qemu-ga firstboot script v2v/convert_windows.ml | 8 +++++++- v2v/windows_virtio.ml
2006 May 11
1
Mixins
If I want to write a function which will be available to views, I write a helper function in one of the places set aside or that very task by Rails. If I want to write a little suite of functions to be mixed in by a number of model classes (but not all), where do I put them? Plug-ins look like AN answer, but they also seem a little heavyweight for simple, project-specific tasks.
2005 Nov 06
1
mixins not reloaded as expected?!
Hi guys, in development mode a module mixed into a helper class seems not to be reloaded inside app/helpers: class TestHelper include EvenMoreHelp #foo end module EvenMoreHelp # bar end the contents of #foo get refreshed, but not #bar... is there a way to fix that behaviour. I intend a full reload in development mode for obvious reasons. Regards Peter
2007 May 01
2
Using mixins versus delegation
I''ve been working on a plugin called Http Test where I add HTML validation and link checking to controller and integration tests through an after filter in ApplicationController. I used to mix in a bunch of methods that I needed into the ApplicationController class, but to me this had a bad smell, so I broke much of the code out into separate classes that I delegate to.
2007 Feb 08
0
derive.js - Ruby-esque derivation/mixins for Prototype
All, I whipped up a small extension for Prototype to solve some modeling issues I was having on a large JS project. I know there have been serveral alternative "write JS in Ruby" type efforts, including ruby.js, rb2js, and prototype.js itself, but I was hoping to keep it as light as possible while gaining the most powerful aspects of derivation/mixins/callbacks. Much like the prototype
2006 Apr 11
1
Mixins?
As is often the case when I tackle a new platform/language, I get the big picture very quickly (because frameworks are frameworks are frameworks) but its the nitty-gritty of the language that bogs me down... So I have some similar methods on a few of my model classes that I wanted to push into a helper. Now I reckoned that the Ruby way was to create a module and mix it in with include. However, I
2006 Feb 28
8
HABTM count table
Hello, I have a question about HABTM and counting records. I have these models class Sort < ActiveRecord::Base has_and_belongs_to_many :reports end class Report < ActiveRecord::Base has_and_belongs_to_many :region has_and_belongs_to_many :subjects has_and_belongs_to_many :sorts end And i would like to get a count like @sort.reports.count The problem is get this query:
2015 Nov 17
0
[PATCH 2/3] v2v: windows: Add a Windows '*.inf' file parser.
This simple parser has (limited) understanding of the Windows '*.inf' file format. This is a Windows config file with some peculiarities. This commit also has a unit test. --- po/POTFILES-ml | 1 + v2v/Makefile.am | 5 +- v2v/v2v_unit_tests.ml | 104 +++++++++++++++++++++++++++++++++++- v2v/windows_inf.ml | 143 ++++++++++++++++++++++++++++++++++++++++++++++++++
2007 Nov 01
8
Specifying mixins
Hi folks, Can anyone share some accumulated wisdom about the best way to spec mixins in general, and (Jamis Buck-style) ActiveRecord "concerns" in particular? The standard situation here is that there''s a bunch of functionality, related by concept if not by implementation, that one wants to inherit in many different classes (e.g. ActiveRecord models) without having to
2006 Feb 26
5
Subversion | CVS | Sourceforge | OS X : Tutorials
Can anyone suggest some step-by-step tutorials for using CVS or Subversion on Sourceforge with OS X ? I''m a new to RoR and creating a Sourceforge project was recommended as a way of working and learning from/with others. But I can''t get over the hurdle of transferring what I''ve already build to csv.sourceforge or subversion.sourceforge. All my attempts generate
2006 Feb 28
4
multiple keys table
probablly a newbie question: Rails does not support a table with multiple keys ??? it seems that the ActiveRecord set_primary_key method can only set the column name... (hope i''m wrong there) example: table A - P.K id, string name table B - P.K id, string name table C - P.K a_id and b_id, both are also foreign keys. Thanks, Amir. -- Posted via http://www.ruby-forum.com/.