Displaying 20 results from an estimated 4000 matches similar to: "How to apply class from Stylesheet to "link_to" element???"
2006 Apr 04
11
Date/Time format and syntax
Hi,
Just wondering how I get both the current date and time to display here
(so far I can only get the date OR the time):
@tblregisteredphone.txtregisterdatetime = Date.today
Also, how can I change the format of the date and time from:
Tue Apr 04 00:00:00 GMT Daylight Time 2006
to
2006-04-04 12:04:00
??
I''m sure it''s very simple, I just don''t know how
2006 Mar 18
3
Nil result on find & pretty print
I am new to Ruby and to Ruby on Rails and have spent the last few days
trying to get my head around it. I think I am already hooked but am
suffering badly from years of programming a non-OO RDBMS. I am trying
to learn by attempting to produce a system for my work.
I have a main table sdocs which has a field supplier_id which is an
entry in another table (suppliers) to lookup supplier name etc.
2008 Oct 01
2
Bug or feature with finding a list element?
This seems odd. When I try to look up a list element which has a space in
the name using just the first word (i.e. no spaces), it will sometimes
return the element with a space in the name and sometimes it will return
NULL.
Try this:
alist <- list( 'hello'=10, bye=20, 'hello world'=30, 'goodbye world'=40, 'hi
world'=50, 'goodbye foo'=60, 'goodbye
2007 Apr 17
3
Is this a bug?
I have found a strange "ifelse" behaviour (I think)
This works:
> ifelse(T,1+1,1+2)
[1] 2
> ifelse(F,1+1,1+2)
[1] 3
Maybe I missed something about R internals, but why
> ifelse(T,print("hello"),print("goodbye"))
[1] "hello"
[1] "hello"
> ifelse(F,print("hello"),print("goodbye"))
[1] "goodbye"
[1]
2005 Aug 19
2
FXO not picking up; baffled
I'm a newbie to Asterisk, but I'm moderately knowledgeable about phone
systems. Right now, I'm most certainly confused.
I have a TDM-04B (four FXO) and four analog FXO lines running into it
from an AdTran 616. I have Asterisk working internally, although I could
use some help getting incoming calls to answer properly and configuring
my outbound dialplan.
Here's where I'm
2006 Jun 08
5
How to find particular pattern in string?
Hi,
In my application I want to find out the occurance of substring
"http:\\" in the main string "http:\\www.abc.com"
Here how to find out whether substring "http:\\" is present in my
String?
& if substring "http:\\" is present then I want to delete it from main
string.
How to do this?
PLs help me.
Thanx in advance.
Prash
--
Posted via
2006 May 08
7
How to get difference between two dates in days???
Hi,
I want to calculate difference between Current date & previous date
(stored in database). The difference should be in days. Hhow to do
that??
PLs tell me.
Thanx in advance.
Prash
--
Posted via http://www.ruby-forum.com/.
2006 Jun 07
2
Qick Q: Expression in this Controller
I tried putting this inside my controller:
def goodbye
@link = Link_to "goodbye!", :action =>"goodbye"
end
and display it in my views calling the @link variable.
Of course it doesn''t work.
Why?
Thanks
--
Posted via http://www.ruby-forum.com/.
2006 Feb 20
3
Caching of classes non working or Howto?
Hello!
I m new to rails. I m playing around with it on a SuSE 10.0 box with
ruby 1.8.2 and gems and rails and postgres. rails xyz creates a nice
rails application, with its directory and ruby script/server runs
webrick nicely and lets me see the page on localhost:3000.
I went with some tutorial to create a Hello page showing the time and a
Bye-Link to link to an Bye page.
cat
2006 Jun 06
4
pls help me regarding Maths round up function.....
Hi,
I have some values on my webpage displaying like
1.22333333333
2.33333344444
2.33377777777
etc.
Here I want to display values upto 2 decimal places correct.
i.e, 1.22333333333 should be dislayed as 1.22
2.33333344444 should be dislayed as 2.33
2.33777777777 should be dislayed as 2.34
& so on....
How to do this in ruby?????
Is there any function???
Thanx in advance.
Prash
--
2003 Jul 24
2
Voicemail() problems - Long pause after incoming message recording ended.
I'm having the following problem:
I call into my Asterisk box (RedHat Linux 9.0, 1 Digium X100P card)
to access voicemail. After dialing the appropriate extension I get
voicemail, am presented with the user's unavailable message, and can
leave a message normally.
The problem comes when I press "#" to end the recording, at which
point I am told "Your message has been
2007 Jul 17
1
No sound from Festival, but *something* is happening
Hey folks,
So I'm trying to get Festival() working on 1.2.17. I'm trying to use
app_festival:
Here's the show dialplan output from that extension:
'3378' => 1. Answer()
[pbx_config]
2. Festival(Hello Asterisk caller. How is your day?)
[pbx_config]
3. Playback(vm-goodbye)
[pbx_config]
4. Hangup()
2006 Mar 17
3
How to check for presence of particular value entered ?
Hi,
I am entering value in textbox ("name") on form. Now name field in
database is having ''unique'' constraint on it so that no 2 records with
same name allowed in database. Now when I m trying to enter same name
into database from my form I m getting following error.
================================
Mysql::Error: #23000Duplicate entry ''Prashant''
2006 Apr 04
1
Moving to Rails-1.1 from Rails-1.0
Hey
I want to port my app (, which is still in early development) to
Rails-1.1 from Rails-1.0. What''s the safest way to go about doing this?
Can I do so without changing any of the stuff I''ve done so far? =]
BTW...does anyone know where Scott Raymond''s Rails-1.1 write-up is? I''ve
been reading a lot about it but I''ve been getting "page not
2006 Feb 19
1
action.controller.domain instead of dmn/cntrlr/action ?
Hey,
I want my users to be able to use the following notation:
-- http://id.action.controller.domain.com/
instead of having to type in the standard Rails:
-- http://domain.com/controller/action/id
How can I do this? Is it even possible? If not, don''t you think this is
something that the core team should have a look at?
(PS. I''m using MySQL for backend and developed
2006 May 12
2
Problem regarding accessing attributes from object...
Hi,
I have an object (@cnt).
Now when I am calling "@cnt.inspect" on object it gives me output as
follows:-
----output----
[#"3"}>]
-----------
Now in aboove output the number between double quotes (3) which is of my
interest & I want to display it. How to do that?
Actually this is my method:-
====================================
class Tagging < ActiveRecord::Base
2005 Mar 21
2
Ext matching problems
Hello everyone...
I'm trying to get up a testing pbx installation. Following instructions
of what've read from the handbook and from asterisk's wiki, I wrote the
dial plan as follows:
[general]
;
;
static = yes
;[globals]
;
[default]
;
exten => 0,1,Answer()
exten => 0,2,Playback(fcopba1)
exten => 0,3,Hangup()
exten => *0,1,Answer()
exten => *0,2,Record(fcopba1:gsm)
2006 Jan 30
10
How do I get the the full URL of an incoming request
Hey,
Is is possible to get the full URL
(''http://www.sender-domain.com/links/list.html'')
from where a user was sent to my site
(www.my-domain.com/controller/action) e.g. by clicking on a link? (I
read about something called a ''request'' object, I don''t know what it is
or does, is that what I''m looking for?
I''m very new to Rails
2007 Feb 08
2
Asterisk outbound calling does not wait for answer before playback
Hello Asteriskers, :-)
We're trying to set up an outbound notification calling for system
alerts with Asterisk 1.4.0. We generate a call file in
/var/spool/asterisk/outgoing and the outbound call is originated through
Zap/1 (Sangoma A200D to a Canadian POTS line). The problem is that
Asterisk does not wait for the other side to answer before it starts
playing the message. So the
2006 Mar 14
3
Can anybody tell me step by step how validate data on form?
Hi,
I am new to ROR. I have created a form with foru fields in ROR. Now its
working fine for all CRUD operations. But I want to validate data on
form for "validates_presence_of" validation. How to do this?
I tried it by putting line "validates_presence_of :description" . But
its not working. Its throws error like "undefined method `each'' for