similar to: Modifying Model Output

Displaying 20 results from an estimated 10000 matches similar to: "Modifying Model Output"

2006 May 10
13
Issue in ActiveRecord generated reader methods
Hi all! I have come into a strange issue in Rails that I am hoping someone can shed some light. To make a very long story short, I have been researching how to override ActiveRecord::Base#read_attribute and write_attribute to perform security checks at the model level (influenced by the ModelSecurity generator). Shortly after implementing some code to check this behavior, I began to
2006 Jul 07
4
Calling a method each time an ActiveRecord Object is accessd
Hi, I know that it is possible to execute code each time data is saved into a model by using the +validate+ method. However, is there also a way to execute code each time the data is accessed, not just when it is changed? Bye, Winsmith -- Posted via http://www.ruby-forum.com/.
2006 Jul 27
25
Why are has_one objects resaved when the parent is saved?
If the associated object of a has_one association has been loaded, it is resaved when the parent is saved. Eg: class Person < ActiveRecord::Base has_one :user end class User < ActiveRecord::Base belongs_to :person end p = Person.find(:first) p.save # As expected, nothing happens with the user association p.user # Loads the associated object p.save # As well as saving the person, the
2006 Feb 14
4
Escaping the AJAX View
I have a login form, in which I use a "form_remote_tag". I''m redirecting users to this form when they fail authentication as well... and using the "jumpto" method of capturing they original URL they requested via request.parameters, and redirecting to this URL after they authenticate. Problem is, if I try to do a "redirect_to", this won''t work, as
2006 Feb 06
7
Delaying initialization of associations until first access
Guys, Say I have the following: ----- class Person < ActiveRecord::Base has_one :house end class House < ActiveRecord::Base belongs_to :person attr_accessor :color end ----- Then I have the following code: ----- john = Person.new john.house.color = "Blue" john.save ----- What I would like to have happen, is that on first call to john.house, if house hadn''t been
2006 Jul 07
3
quick send_data question...
Hi, I am using send_data to allow users to download files from the database but ran into a small problem, it seems that files upload fine but when they download only 64kb of the file is sent. I''m using the basic rails code from the Agile book: #upload code in my sheet model def file=(document_field) self.filename = base_part_of(document_field.original_filename)
2005 Jun 08
4
IceCast 2.2 MP3 stream and Real Player noise
I tested it this morning and here are my findings: 1) The Intro tag causes Real Player to give an error that the stream "contains unexpected data and may be corrupt". It does not play with the Intro tag in the mount point. If I remove the Intro tag the stream plays, and, the Real Player noise caused by meta-data is gone and the meta-data updates work. 2) The Intro plays in iTunes and
2011 Nov 15
2
Regular expressions in R
Good afternoon list, I have the following character strings; one with spaces between the maths operators and variable names, and one without said spaces. form<-c('~ Sentence + LEGAL + Intro + Intro / Intro1 + Intro * LEGAL + benefit + benefit / benefit1 + product + action * mean + CTA + help + mean * product')
2005 Jan 14
4
<intro> stream stopt after intro
Hi Guys, I'm using the icecast-2.1-kh5 for the intro feature. The intro works, but after the intro it stops. It does not go on with the stream. When I comment the intro part, the stream works perfectly. Does anybody know what I can do to solve this problem? -- Met vriendelijke groeten, Jesper Weiland Exonet Internet Services Koopmanslaan 3 7005 BK Doetinchem E: Jesper@exonet.nl T:
2020 Mar 19
1
Zero listeners on icecast stats
I must try that. Will let you know asap! btw I'm not "trying to stick with the one that has the most universal "default browser support" but instead trying to avoid a LOT of listeners writing me "my player/browser/whatever doesn't connect, it doesn't understand ogg / opus / xspf " etc. etc. - so mp3 it is. It's simple surviving :) On 3/18/20, Jeroen van
2020 Oct 28
2
HLS enabled mounts
I second that advice. Also when you reference your file in intro do this <intro>/Sonic.mp3 </intro> . As long as it is in the folder you don’t need the whole path. Patricia > On Oct 28, 2020, at 10:08 AM, Robert Fitzpatrick <robert at webtent.org> wrote: > > Mayiani, Martin Martine - mayianmm wrote on 10/27/2020 11:03 PM: >> Hi Robert, >> Unfortunately I
2011 Dec 12
5
not complete character in csv file
Dear R users, I got the following problem. Given that > data[3,2] [1] "010252" Code: intro <- data.frame() intro[1,1] <- as.character(data[3,2]) write.csv(intro, file='intro.csv') In 'intro.csv' file I am loosing the 0 in frot of 10252, which I need. Is there a way to keep the full character saved? R 2.13.2 (64 bit). Thanks, robert -- View this message in
2020 Mar 16
6
Zero listeners on icecast stats
Hi there, I just set up a system of fallback streams for our free radio station here but I have this weird problem: it always show zero listeners. Our setup is this: We have a listening mount point for people - that fall back to a live streaming from a cellular phone - that fall back to a live streaming from a base station (a pc), that fall back to a 24/7 archive streaming. No matter what the
2020 Oct 28
3
HLS enabled mounts
Hi Robert, Unfortunately I am not replying to answer your question but to ask a question on pre-roll. I am working on a similar project but still at the configuration stages. For some reason my intro file is not being played. I am also using Icecast 2.4.4 and have four mount points on one relay server. I am trying to use my intro file on only one mount point. I am also doing mp3 not HLS.
2020 Oct 22
2
Use mountsettings with ices2 or ezstream?
I did this, but nothing happens. <mount> <mount-name>/lyssna.ogg</mount-name> <intro>/etc/ices2/music/intro.ogg</intro> </mount> Den tors 22 okt. 2020 kl 17:24 skrev Geoff Shang <geoff at quitelikely.com>: > On Thu, 22 Oct 2020, Bananradion wrote: > > > Since I use ices i don't use the mountpoints in
2020 Mar 16
2
Zero listeners on icecast stats
On 16 Mar 2020, at 12:02, José Luis Artuch wrote: > Hi Gabriele, > > El lun, 16-03-2020 a las 11:04 +0100, Gabriele Zaverio escribió: >> Hi there, >> >> I just set up a system of fallback streams for our free radio station >> here but I have this weird problem: it always show zero listeners. >> >> Our setup is this: >> >> We have a
2006 May 09
11
model filter?
Hi All, Is there a way to filter / modify the output of a model class before it''s returned to controller/view that''s calling it? Example: I have a field phone_number which I always want to preformat using the number_to_phone() helper.... Any help is appriciated. Thanks! -- Posted via http://www.ruby-forum.com/.
2018 Apr 18
2
Intro & Chrome v. 65.0.33.25.181
Hi there, Any other versions of Google Chrome and all version of other browsers are working. I have done my best to set up the intro to match the live stream. http://185.139.168.34:8000/yleisohjelma - intro is 256 kbits/s 48 kHz ISO-MPEG2 L3 - live is 256 kbits/s 48 kHz ISO-MPEG2 L3 http://185.139.168.34:8000/vara - live is 128 kBits/s 48 kHz, possible ISO-MPEG2 L3 - there is no intro Of
2010 Mar 23
3
Which folder for sounds?
1.6.2: -- Executing [s at incoming-pstn-line:4] VoiceMail("DAHDI/4-1", "100 at default,u") in new stack -- <DAHDI/4-1> Playing '/var/spool/asterisk/voicemail/default/100/unavail.gsm' (language 'en') [Mar 22 17:15:46] WARNING[31145]: file.c:650 ast_openstream_full: File vm-intro does not exist in any format [Mar 22 17:15:46] WARNING[31145]:
2020 Mar 16
1
Zero listeners on icecast stats
Have you considered round robin DNS.. essentially you assign the same A record to two IPs. I do this and it distributes listeners for me without Icecast. Sent from my iPhone > On Mar 16, 2020, at 6:02 AM, Jos� Luis Artuch <artuch at speedy.com.ar> wrote: > > Hi Gabriele, > >> El lun, 16-03-2020 a las 11:04 +0100, Gabriele Zaverio escribió: >> Hi there, >>