similar to: Best practice: "reaching" through many tables?

Displaying 20 results from an estimated 10000 matches similar to: "Best practice: "reaching" through many tables?"

2005 Dec 16
3
Adding methods to models
All, This is more of a theoretical question I suppose - I''m looking for what the consensus is for the "correct" approach in Rails/MVC. I have a standard security model where a User can have many Roles. There is a User model, a Role model, and in the db, a linking table, etc. Each role has a name as well as a category (say, name="waiter", category="restaurant
2008 Mar 10
1
dialplan logic questions: macro not reaching DIALSTATUS based extension (s-ANSWER)
Hello everyone, I'm having some troubles with some dialplan logic I've written which sends missed call notifications via e-mail. It's currently sending these notifications even if the call was answered, marking them all as hung-up. What I've been able to see is that the macro never reaches the "s-ANSWER" bits which mark the call as successful. I've posted my
2008 Oct 14
2
best-practice for programmatically using rxml generated from controller/view? (or 'how can I view a view from a model')
Hey Guys, Here''s the scenario: I''ve got vendor-specific XML I need to create and then POST it somewhere. It sounds easy enough, but I''m running into issues when it comes time to actually use the XML. Trying hard to stay within the MVC pattern I: 1) Create a controller which loads the models I''m about to turn into XML 2) Create an rxml view which renders the
2006 Feb 18
4
verifying best practice
i have a Project model, which belongs_to :user when i add a project, the users_id is based on the session[:users_id]. to get the users_id into the projects table, i''m doing this: @project = Project.new(params[:project]) @project.users_id = session[:users_id] this is working, i''m just verifying this is the best way to do it.
2019 Feb 26
2
Problem with mdadm, raid1 and automatically adds any disk to raid
> On 2/24/19 9:01 PM, Jobst Schmalenbach wrote: >> I tried to delete the MDX, I removed the disks by failing them, then >> removing each array md0, md1 and md2. >> I also did >> >> dd if=/dev/zero of=/dev/sdX bs=512 seek=$(($(blockdev --getsz >> /dev/sdX)-1024)) count=1024 > > > Clearing the initial sectors doesn't do anything to clear the
2010 Oct 20
7
How can I render a template outside of a controller in Rails 3?
Hi All, I can''t seem to render a template outside of a controller in my Rails 3 application. The googling I''ve done has been helpful, and I eventually found some useful info at http://www.swombat.com/rails-rendering-templates-outside-of-a-contro. However, this seems to be broken in Rails 3. Does anyone have any ideas how I can fix this method or perhaps know of a better
2006 Jun 21
12
Question{maybe silly] Sanity check
This maybe a silly question and the fact that I need a sanity check might even be weirder, but I''m trying to set realistic expectations for myself. I''ve been reading reading reading AWDWR, Ruby on Rails, some of the PickAxe, and even done a few recipes from Rails Recipes. This is all of two weeks. I feel that I''ve learned a considerable amount but going through the
2012 Jul 17
2
[LLVMdev] Switching between sibling/cousin registers via API calls
I have a register hierarchy that looks like a binary tree. v4 -> {v2, v2} -> {s, s}{s, s}(or, {x, y}, {z, w}) I have an instruction that can access the 2nd and/or 4th scalar and an instruction that can access the 1st and/or 3rd scalar. What I need to do is that given the first scalar, I need to be able to select the 2nd scalar, or/and given the 3rd, select the 4th. I define a sibling
2006 Jun 06
4
PHP FTP functions equivalents?
Two questions from a PHP guy thinking of moving to Rails: 1. Does Rails have equivalents for PHP''s FTP functions (www.php.net/ftp)? 2. What about image editing functions similar to PHP''s GD2 functions? (I would basically want to be able to crop, rotate, draw lines, add text...) I searched online for the above but I got somewhat conflicting info about image editing and
2012 Jul 17
0
[LLVMdev] Switching between sibling/cousin registers via API calls
Hi Micah, This sounds somewhat similar to what ARM uses for the stride-by-two vector load instructions. For example, Tuples2DSpc. While not exactly what you're looking for, perhaps something along those lines would work? -Jim On Jul 17, 2012, at 3:24 PM, "Villmow, Micah" <Micah.Villmow at amd.com> wrote: > I have a register hierarchy that looks like a binary tree. >
2006 Sep 06
3
Intel Boot Agent: PXE-E32: TFTP open timeout for correctly configured tftp-hpa
Hello. In my case I can successfully boot up my Thinkpad X32, but the same configuration doesn't work for my desktop computer with Intel network card, with Intel Boot Agent 2.2 DHCP server is 10.0.0.1, tftpd (used tftp-hpa) runs on 10.0.0.32. netstat told me the daemon listen to 69 UDP port just fine. running tftp in commandline also shows it works (retrieve pxelinux.0 less then 1 second).
2007 Oct 26
3
Specing with Subdomains as Account Keys
How do you go about implementing and rspecing subdomains as account keys? I''m sure that this must be an issues for others as well. So I have an app using subdomains as account keys. The Application Controller sets up @current_company in a before filter. Everything is done within the context of the @current_company. After reading about Demeter''s Revenge
2006 Oct 24
10
Meetme... No channel type registered for 'zap'
When I call meetme: exten => 1000,1,Answer exten => 1000,n,Meetme(|||d) Asterisk is complaing with: -- Executing Answer("IAX2/xxx.yyy.142.204:4569-2", "") in new stack -- Executing MeetMe("IAX2/xxx.yyy.142.204:4569-2", "|||d") in new stack -- Playing 'conf-getconfno' (language 'en') Warning, flexible rate not
2009 Jun 17
2
- Make an automatic install bootable CD
Hello, I tried to make an automatic install bootable CD, with a kickstart file. I use this command to create my CD : sudo mkisofs -v -r -T -b isolinux/isolinux.bin -c isolinux/boot.cat -J -o InstallCD.iso -no-emul-boot -boot-load-size 4 -boot-info-table -hide-rr-moved . I copied all the contents of the CD #1, on a InstallCD dir, on copied my ks.cfg file into the isolinux directory. When I
2005 Jun 01
7
SNOM 360 extension lights
I recently got a SNOM 360 and have been trying to get the extension lights to work. I can see the subscriptions with sip show subscriptions but I don't see any notifies when a call is made. I must be missing something because I've tried looking to see if anyone else has had this problem but the only solutions I've seen have been to put hints in and I have those. Any suggestions?
2008 Apr 29
4
Default values for belongs_to and has_one
There really doesn''t seem to be a *declarative* way to define a default value for belongs_to and has_one associations class Person < ActiveRecord::Base belongs_to :address end p = Person.new p.address.city = ''Atlantis'' # Bummer! Of course, there''s an easy way to avoid this class Person < ActiveRecord::Base belongs_to :address
2006 Aug 11
3
General architechture / MVC question
Hi all, A newbie with Ruby on Rails - and programming in general - I''m working on a few Flash and PHP projects as well. Partly to make my work more efficient, partly to gain a better understanding of system architecture / design patterns, I''ve been trying to use the MVC pattern in database-backed Flash / Actionscript development as well. I think / hope that I''m
2006 Jul 14
3
compare two tables and find the difference?
I need to compare a column in TableA to a column in TableB and then select 3 columns from TableA for all the records in TableA that don''t exist in TableB. TableA and TableB are different but do have one field in common that i am comparing. The tables are not related in anyway. right now I have a find_by_sql query located in a model that looks like this: def self.absent_charges
2006 Mar 02
7
The no-framework PHP MVC framework
"The no-framework PHP MVC framework" http://toys.lerdorf.com/index.php?url=archives/38-The-no-framework-PHP-MVC-framework.html Yuck! What spaghetti code. I can''t ever imagine preferring that to Rails. Joe -- Posted via http://www.ruby-forum.com/.
2006 Apr 23
8
Shattered, the rails-based MVC game development framework
if( you_want_to_make_a_game_with_ruby ) { http://shattered.hastilymade.com/shattered_ruby.png http://shattered.hastilymade.com/shattered_ruby.png http://shattered.hastilymade.com/shattered_ruby.png Shattered 0.3 has just been released! Inspired by Ruby on Rails, Shattered is doing for game development what rails has done for web development. Get it here ! We''ve made this