Changing from double to single quotes. Fixing <<" for rdoc
This commit is contained in:
parent
99ed1fbdc6
commit
a84e8a62e1
1 changed files with 13 additions and 13 deletions
|
|
@ -6,12 +6,12 @@ class Screenshot < ActiveRecord::Base
|
||||||
}
|
}
|
||||||
|
|
||||||
has_attached_file :image,
|
has_attached_file :image,
|
||||||
styles: { :large => "800x600>", :thumb => "160x120>" },
|
styles: { :large => '800x600>', :thumb => '160x120>' },
|
||||||
default_url: "/images/dummy/no-screenshots-upload-one.svg",
|
default_url: '/images/dummy/no-screenshots-upload-one.svg',
|
||||||
#path: ":rails_root/public/system/:class/:attachment/:id_partition/:style/:filename",
|
#path: ':rails_root/public/system/:class/:attachment/:id_partition/:style/:filename',
|
||||||
path: ":rails_root/public/screenshots/:id_partition/:style.png",
|
path: ':rails_root/public/screenshots/:id_partition/:style.png',
|
||||||
url: "/screenshots/:id_partition/:style.png",
|
url: '/screenshots/:id_partition/:style.png',
|
||||||
hash_secret: "M4xGM9v6y17Y27sZ1liWrnQaXdX4YDdZCJ7fOqcAUg3cZJqK9x"
|
hash_secret: 'M4xGM9v6y17Y27sZ1liWrnQaXdX4YDdZCJ7fOqcAUg3cZJqK9x'
|
||||||
validates_attachment_content_type :image, :content_type => /\Aimage\/png\Z/
|
validates_attachment_content_type :image, :content_type => /\Aimage\/png\Z/
|
||||||
|
|
||||||
# Return caption for full-screen screenshots.
|
# Return caption for full-screen screenshots.
|
||||||
|
|
@ -27,28 +27,28 @@ class Screenshot < ActiveRecord::Base
|
||||||
|
|
||||||
def uploader
|
def uploader
|
||||||
# TODO: Implement the ownership of images
|
# TODO: Implement the ownership of images
|
||||||
"Anonymous"
|
'Anonymous'
|
||||||
end
|
end
|
||||||
|
|
||||||
# Return Debshots 1.x path to allow migration of images into Paperclip filesystem schema
|
# Return Debshots 1.x path to allow migration of images into Paperclip filesystem schema
|
||||||
def image_url(size)
|
def image_url(size)
|
||||||
"#{Rails.configuration.images_path_prefix}/#{self.package.name[0]}/#{self.package.name}/#{self.id}_#{size}.png"
|
'#{Rails.configuration.images_path_prefix}/#{self.package.name[0]}/#{self.package.name}/#{self.id}_#{size}.png'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def status
|
def status
|
||||||
text = ''
|
text = ''
|
||||||
# Completes the sentence: "This image…"
|
# Completes the sentence: 'This image...'
|
||||||
if self.approved
|
if self.approved
|
||||||
text <<'is public'
|
text << 'is public'
|
||||||
else
|
else
|
||||||
text <<'has to be moderated before being publicly visible'
|
text << 'has to be moderated before being publicly visible'
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.markedfordelete
|
if self.markedfordelete
|
||||||
text <<' (and was requested to be removed)'
|
text << ' (and was requested to be removed)'
|
||||||
end
|
end
|
||||||
|
|
||||||
text
|
return text
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue