Sha256: 4ba91908e6238d2718b85679e608dc1111a3ec9c4d4a6cc49fcba881d75e8774
Contents?: true
Size: 1.06 KB
Versions: 6
Compression:
Stored size: 1.06 KB
Contents
require "active_record" require "html_terminator" ActiveRecord::Base.establish_connection({ :adapter => "sqlite3", :database => ":memory:" }) ActiveRecord::Schema.define do create_table "only_first_names", :force => true do |t| t.column "first_name", :text t.column "last_name", :text t.column "age", :integer end create_table "two_fields_with_options", :force => true do |t| t.column "first_name", :text t.column "last_name", :text t.column "age", :integer end create_table "first_name_with_options", :force => true do |t| t.column "first_name", :text t.column "last_name", :text t.column "age", :integer end end class OnlyFirstName < ActiveRecord::Base include HtmlTerminator terminate_html :first_name end class TwoFieldsWithOptions < ActiveRecord::Base include HtmlTerminator terminate_html :first_name, elements: ["strong"] terminate_html :last_name, elements: ["em"] end class FirstNameWithOptions < ActiveRecord::Base include HtmlTerminator terminate_html :first_name, :elements => ["flexbox"] end
Version data entries
6 entries across 6 versions & 1 rubygems