Hi there everyone, How would I go about adding the dojoType to a rails text_area form helper i.e. <%= f.text_area :content %> Regards, Schalk --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Not 100% sure since I''ve never tried Rails + Dojo, but as I recall don''t most of the tags allow for additional HTML content to be specified as a Hash? If so, couldn''t you pass the dojoType attribute and value to that? As I said I''ve never tried this, so it might not work depending on how exactly the internals of Rails parses the values provided - Wayne On Apr 13, 4:06 pm, Schalk Neethling <volume4.sch...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi there everyone, > > How would I go about adding the dojoType to a rails text_area form > helper i.e. > > <%= f.text_area :content %> > > Regards, > Schalk--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I Wayne,
Thank for the feedback. Yes, I saw that all the form helpers do show a
options = {} argument but when I try to do:
<%= f.text_area :content, options = {dooType="someDojoType"} %>
I get a compile error. Can you show me what you mean by specifying
additional HTML content as a Hash?
Kind Regards,
Schalk Neethling
On Sun, Apr 13, 2008 at 10:22 PM, Wayne M
<wayne.molina-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> Not 100% sure since I''ve never tried Rails + Dojo, but as I
recall
> don''t most of the tags allow for additional HTML content to be
> specified as a Hash? If so, couldn''t you pass the dojoType
attribute
> and value to that?
>
> As I said I''ve never tried this, so it might not work depending
on how
> exactly the internals of Rails parses the values provided
>
> - Wayne
>
>
>
> On Apr 13, 4:06 pm, Schalk Neethling
<volume4.sch...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > Hi there everyone,
> >
> > How would I go about adding the dojoType to a rails text_area form
> > helper i.e.
> >
> > <%= f.text_area :content %>
> >
> > Regards,
> > Schalk
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
<%= f.text_area :content, :dooType => "someDojoType", :id => "element_id" %> Schalk Neethling wrote:> I Wayne, > > Thank for the feedback. Yes, I saw that all the form helpers do show a > options = {} argument but when I try to do: > > <%= f.text_area :content, options = {dooType="someDojoType"} %> > > I get a compile error. Can you show me what you mean by specifying > additional HTML content as a Hash? > > Kind Regards, > Schalk Neethling-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ummmm I think he wanted the dooType attribute set on the text area
tax, not sent in through the params attribute (ie on the key-val
mappings of the URL line).
that would be
<%= f.text_area(:content, {:dooType => "someDojoType"}) %>
Here "content" would be the attribute of the object passed into the
form object "f".
Is this what you wanted?
Julian.
Learn Ruby on Rails! Check out the FREE VIDS (for a limited time)
VIDEO #4 coming soon!
http://sensei.zenunit.com/
On 14/04/2008, at 9:29 AM, Nathan Esquenazi wrote:
>
> <%= f.text_area :content, :dooType => "someDojoType", :id
=>
> "element_id" %>
>
> Schalk Neethling wrote:
>> I Wayne,
>>
>> Thank for the feedback. Yes, I saw that all the form helpers do
>> show a
>> options = {} argument but when I try to do:
>>
>> <%= f.text_area :content, options =
{dooType="someDojoType"} %>
>>
>> I get a compile error. Can you show me what you mean by specifying
>> additional HTML content as a Hash?
>>
>> Kind Regards,
>> Schalk Neethling
>
> --
> Posted via http://www.ruby-forum.com/.
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
<%= f.text_area(:content, {:dooType => "someDojoType"}) %>
and
<%= f.text_area(:content, :dooType => "someDojoType") %>
are the same thing. If the last argument is a hash, there is no need to
include the hash tags. Matter of personal preference, but I prefer it
without the explicit hash tags when they are not needed.
Julian Leviston wrote:> Ummmm I think he wanted the dooType attribute set on the text area
> tax, not sent in through the params attribute (ie on the key-val
> mappings of the URL line).
>
> that would be
>
> <%= f.text_area(:content, {:dooType => "someDojoType"})
%>
>
> Here "content" would be the attribute of the object passed into
the
> form object "f".
>
> Is this what you wanted?
>
> Julian.
>
>
> Learn Ruby on Rails! Check out the FREE VIDS (for a limited time)
> VIDEO #4 coming soon!
> http://sensei.zenunit.com/
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Yep. Julian. Learn Ruby on Rails! Check out the FREE VIDS (for a limited time) VIDEO #4 coming soon! http://sensei.zenunit.com/ On 14/04/2008, at 10:08 AM, Nathan Esquenazi wrote:> > <%= f.text_area(:content, {:dooType => "someDojoType"}) %> > > and > > <%= f.text_area(:content, :dooType => "someDojoType") %> > > are the same thing. If the last argument is a hash, there is no need > to > include the hash tags. Matter of personal preference, but I prefer it > without the explicit hash tags when they are not needed. > > Julian Leviston wrote: >> Ummmm I think he wanted the dooType attribute set on the text area >> tax, not sent in through the params attribute (ie on the key-val >> mappings of the URL line). >> >> that would be >> >> <%= f.text_area(:content, {:dooType => "someDojoType"}) %> >> >> Here "content" would be the attribute of the object passed into the >> form object "f". >> >> Is this what you wanted? >> >> Julian. >> >> >> Learn Ruby on Rails! Check out the FREE VIDS (for a limited time) >> VIDEO #4 coming soon! >> http://sensei.zenunit.com/ > > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi there,
In the end it was so simple I could kick myself:
<%= f.text_area :content, {dojoType = "dijit.Editor} %>
And Bob''s your uncle :)
Regards,
Schalk
On Mon, Apr 14, 2008 at 2:52 AM, Julian Leviston
<julian-AfxEtdRqmE/tt0EhB6fy4g@public.gmane.org>
wrote:>
> Yep.
>
>
> Julian.
>
> Learn Ruby on Rails! Check out the FREE VIDS (for a limited time)
> VIDEO #4 coming soon!
> http://sensei.zenunit.com/
>
>
>
> On 14/04/2008, at 10:08 AM, Nathan Esquenazi wrote:
>
> >
> > <%= f.text_area(:content, {:dooType =>
"someDojoType"}) %>
> >
> > and
> >
> > <%= f.text_area(:content, :dooType => "someDojoType")
%>
> >
> > are the same thing. If the last argument is a hash, there is no need
> > to
> > include the hash tags. Matter of personal preference, but I prefer it
> > without the explicit hash tags when they are not needed.
> >
> > Julian Leviston wrote:
> >> Ummmm I think he wanted the dooType attribute set on the text
area
> >> tax, not sent in through the params attribute (ie on the key-val
> >> mappings of the URL line).
> >>
> >> that would be
> >>
> >> <%= f.text_area(:content, {:dooType =>
"someDojoType"}) %>
> >>
> >> Here "content" would be the attribute of the object
passed into the
> >> form object "f".
> >>
> >> Is this what you wanted?
> >>
> >> Julian.
> >>
> >>
> >> Learn Ruby on Rails! Check out the FREE VIDS (for a limited time)
> >> VIDEO #4 coming soon!
> >> http://sensei.zenunit.com/
> >
> > --
> > Posted via http://www.ruby-forum.com/.
> >
> > >
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---