ejholmes / active_admin_editor

Rich text editor for Active Admin using wysihtml5.
MIT License
184 stars 134 forks source link

Please, write some tutor in README.rb file, how to show html. #52

Open KanybekMomukeyev opened 10 years ago

KanybekMomukeyev commented 10 years ago

Here is how we will input html code:

    ActiveAdmin.register Page do
     form do |f|
       f.inputs do
       f.input :title
       f.input :content, as: :html_editor
    end

    f.buttons
   end|

How to write show ?

KanybekMomukeyev commented 10 years ago

Answer:

show do |hotel|
    attributes_table do     
      row 'Hotel description' do
        raw(hotel.description)
      end
  end