I have a standard block in my model like this:
class Product < ActiveRecord::Base
  hobo_model # Don't put anything above this
  fields do
    name            :string
    highlight       :html
    description     :html
    feature         :html
    specifications  :html
    requirement     :html
    timestamps
  end

belongs_to :category
...
end

in application.dryml for the product-form I do:
<extend tag="form" for="Product">
  <old-form merge multipart>
    <field-list: fields="name, price, highlight, description, feature,
specifications, requirement, category"/>
  </old-form>
</extend>

I did some layout overrides in application.dryml in which I tried to
call
<def tag="show-page" for="Product">
  <page merge title="#{ht
'products.show.title', :default=>['Product'] }">
    <body: class="product-show-page product" param/>
    <content: param>
             <view:content param="highlight"/> #####<= this is the one
   </content:>
  </page>
</def>

This would print out as "<p> foo bar </p>" instead of "foo
bar" (formatted as p in html).
When I check the db I find "<p> foo bar </p>" in the
product_translations table (as expected) but the view understandably
doesn't know that html is ok here (as the
product_translations.description column has the type text).

With this last one I could live, as the old <%= this.highlight %> does
the job. But as far as I understand I either get both problems (no
editor in the form and no html through <view:highlight
param="highlight"/>) or none ...


On 8 Sep., 20:56, kevinpfromnm <[email protected]> wrote:
> how are the fields declared in your fields block?  have you overridden
> any of the views?
>
> On Sep 8, 6:56 am, val2many <[email protected]> wrote:
>
> > Hi,
>
> > I have a bilingual app set up. Using globalize to manage the
> > translations for the actual data works nicely.
> > But:
> > opening the edit view works fine (I see my fck editor).
>
> > Then I put something in a field that previously was a rich type
> > (:html) it saves the data correctly in the translation table generated
> > by globalize.
>
> > In the view, I get the html escaped so I see all html tags as well. (I
> > can get around that by falling back to <%= this.foo %>
>
> > Reopening the editor all former :html fields are now text fields with
> > only one line.
>
> > I do understand, that this is because hobo-fields doesn't know I would
> > like it to treat that field as if it where :html.
>
> > Can anyone push me towards a solution for this?
>
> > Thanks,
>
> > Val

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to