Sha256: de064b7268a6e1d584cee2f778863eba7e06fe7bd079b5a1ff11f9f30ac1f287
Contents?: true
Size: 1.38 KB
Versions: 1
Compression:
Stored size: 1.38 KB
Contents
= areeya_textile Prosty plugin do obsługi Textile w modelach ActiveRecord oraz widokach. Wymaga RedCloth[http://redcloth.org] oraz RSpec. Paweł Dzioba <pdzioba@me.com> GitHub Projekt: http://github.com/pdzioba/areeya_textile == Instalacja: Jako plugin: script/plugin install git://github.com/pdzioba/areeya_textile.git Jako gem: sudo gem install pdzioba-areeya_textile --source=http://gems.github.com lub wpisując w config/environment.rb w aplikacji: Rails::Initializer.run do |config| ... config.gem "RedCloth", :version => ">= 4.1.1", :source => "http://code.whytheluckystiff.net" config.gem 'pdzioba-areeya_textile', :lib => 'areeya_textile', :source => 'http://gems.github.com' ... end == Wykorzystanie: === Model Przykład: class Page < ActiveRecord::Base acts_as_textile :body end @page = Page.find(:first) @page.body.to_s #=> "h2. Textile Headline" @page.body.to_html #=> "<h2>Textile Headline</h2>" === Widok Skopiowanie wymaganych plików: rake areeya_textile:install Przykłady: <%= text_area :page, :body %> # standardowe pole tekstowe <%= textile_area :page, :body %> # pole tekstowe z paskiem narzędziowym <%= textile_area :page, :body, :rows => 5, :cols => 10 %> <% form_for :page do |f| -%> # pole tekstowe w formularzu <%= f.textile_area :body %> <% end -%>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pdzioba-areeya_textile-1.1.0 | README.rdoc |