[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

H- Undefined Method?

Ben V.

7/22/2006 3:02:00 PM

I know you can use the method h() to HTMLEdit varible, but ruby doesn't
seem to think it exists when I did this:
@a_user.firstname = h(params[:firstname])
It gave me this error:
undefined method `h' for #<JoinController:0xb7b1c508>
What's wrong? I know That the method is defined. Thanks, sorry for all
the stupid questions, but I am new from CF and i is worlds apart from
Ruby.
P.S I am using @a_user.firstname within the creation of a db row.

--
Posted via http://www.ruby-....

5 Answers

James Britt

7/22/2006 3:23:00 PM

0

Ben V. wrote:
> I know you can use the method h() to HTMLEdit varible, but ruby doesn't
> seem to think it exists when I did this:

Ruby does not have a built-in 'h' method. Are you using an
additional framework or third-party libraries?



--
James Britt

http://www.ru... - Ruby Help & Documentation
http://www.artima.c... - The Journal By & For Rubyists
http://www.rub... - The Ruby Store for Ruby Stuff
http://refreshing... - Design, technology, usability

Ben V.

7/22/2006 3:34:00 PM

0

Sorry, yes, Rails. What method could I use instead? Not really familliar
with ther methods; I'm pretty new to Rails/Ruby. But still, it should
work in a controller file.Thanks,
Ben.

--
Posted via http://www.ruby-....

James Britt

7/22/2006 3:43:00 PM

0

Ben V. wrote:
> Sorry, yes, Rails. What method could I use instead? Not really familliar
> with ther methods; I'm pretty new to Rails/Ruby. But still, it should
> work in a controller file.Thanks,

1. I think that method works only in helper code or in views, but not
(by default) in controllers.

2. Please ask rails questions on the rails mailing list.

http://lists.rubyonrails.org/mailman/list...

--
James Britt

"Inside every large system there's a small system trying to get out".
- Chet Hendrickson

Rimantas Liubertas

7/22/2006 4:14:00 PM

0

> Ben V. wrote:
> > I know you can use the method h() to HTMLEdit varible, but ruby doesn't
> > seem to think it exists when I did this:
>
> Ruby does not have a built-in 'h' method. Are you using an
> additional framework or third-party libraries?

'h' method comes from ERB::Util
http://ruby-doc.org/core/classes/ERB...


Regards,
Rimantas
--
http://rim...

Ben V.

7/22/2006 4:44:00 PM

0

Rimantas Liubertas wrote:
>> Ben V. wrote:
>> > I know you can use the method h() to HTMLEdit varible, but ruby doesn't
>> > seem to think it exists when I did this:
>>
>> Ruby does not have a built-in 'h' method. Are you using an
>> additional framework or third-party libraries?
>
> 'h' method comes from ERB::Util
> http://ruby-doc.org/core/classes/ERB...
>
>
> Regards,
> Rimantas

Thanks, I'm not used to having to call additional modules or classes
from my native CF.

--
Posted via http://www.ruby-....