Sha256: d0f68e41072fd81c59f343a9dec11a990c684ef64bb4b75710aeff9f06c26a8d
Contents?: true
Size: 333 Bytes
Versions: 11
Compression:
Stored size: 333 Bytes
Contents
class Post < ActiveRecord::Base has_many :translations accepts_nested_attributes_for :translations, :allow_destroy => true Image = Struct.new(:url) do def url(type = nil) type = "original" if type.blank? Rails.root.join("sample/#{type.to_s}.png") end end def image Image.new end end
Version data entries
11 entries across 11 versions & 1 rubygems