Merge branch 'szzh' into develop
This commit is contained in:
commit
9079eaa4f9
|
@ -15,13 +15,13 @@ module Mobile
|
|||
when :img_url
|
||||
url_to_avatar(u)
|
||||
when :gender
|
||||
u.user_extensions.gender.nil? ? 0 : u.user_extensions.gender
|
||||
u.nil? || u.user_extensions.nil? || u.user_extensions.gender.nil? ? 0 : u.user_extensions.gender
|
||||
when :work_unit
|
||||
get_user_work_unit u
|
||||
when :location
|
||||
get_user_location u
|
||||
when :brief_introduction
|
||||
u.user_extensions.brief_introduction
|
||||
u.nil? || u.user_extensions.nil? ? "" : u.user_extensions.brief_introduction
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -345,7 +345,7 @@ class CoursesService
|
|||
def course_dynamic(params,current_user)
|
||||
|
||||
@user = User.find(params[:id])
|
||||
if !current_user.admin? && !@user.active?
|
||||
if current_user.nil? && !current_user.admin? && !@user.active?
|
||||
raise '404'
|
||||
return
|
||||
end
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
class ChangeFileDigests < ActiveRecord::Migration
|
||||
def up
|
||||
change_column :zip_packs, :file_digests, :text
|
||||
end
|
||||
|
||||
def down
|
||||
change_column :zip_packs, :file_digests, :string
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20150402015402) do
|
||||
ActiveRecord::Schema.define(:version => 20150415032102) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -1458,7 +1458,7 @@ ActiveRecord::Schema.define(:version => 20150402015402) do
|
|||
t.string "file_path"
|
||||
t.integer "pack_times", :default => 1
|
||||
t.integer "pack_size", :default => 0
|
||||
t.string "file_digests"
|
||||
t.text "file_digests"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue