Give a bit more demo info in the conference description

This commit is contained in:
Henne Vogelsang 2016-05-03 14:13:45 +02:00
parent 5b20c992ae
commit 084ee7ef43
4 changed files with 9 additions and 4 deletions

View file

@ -7,10 +7,13 @@ class PictureUploader < CarrierWave::Uploader::Base
# use cloudinary if it's configured
if Cloudinary.config.cloud_name
# use https by default
Cloudinary.config.secure = true
include Cloudinary::CarrierWave
def public_id
return model.try(:photo_file_name) || model.try(:logo_file_name)
model.try(:photo_file_name) || model.try(:logo_file_name)
end
end

View file

@ -2,7 +2,9 @@ namespace :data do
desc 'Create demo data using our factories'
task demo: :environment do
include FactoryGirl::Syntax::Methods
create(:full_conference)
create(:admin, email: 'admin@osem.io', username: 'admin', password: 'password', password_confirmation: 'password')
conference = create(:full_conference, title: 'Open Source Event Manager Demo', short_title: 'osemdemo' ,description: "This is a [Open Source Event Manager](http://osem.io/) demo instance. You can log in as **admin** with the password **password123** or just you just [sign up](/accounts/sign_up) with your own user. We hope you enjoy checking out all the functionality, if you have questions don't hesitate to [contact us](http://osem.io/#contact)!\r\n\r\n## Data will be destroyed every thirty minutes or whenever someone updates the [OSEM source code on github](https://github.com/openSUSE/osem/commits/master).")
conference.contact.update_attributes(email: 'osemdemo@osem.io', sponsor_email: 'osemdemo@osem.io')
create(:admin, email: 'admin@osem.io', username: 'admin', password: 'password123', password_confirmation: 'password123')
end
end

View file

@ -46,7 +46,7 @@ FactoryGirl.define do
create(:question, conferences: [conference])
# Logo...
File.open("spec/support/logos/#{1 + rand(13)}.png") do |file|
File.open('spec/support/logos/OSEM.jpg') do |file|
conference.picture = file
end
conference.save!

BIN
spec/support/logos/OSEM.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB