style fixes
This commit is contained in:
parent
fc753282d3
commit
a87018192a
4 changed files with 15 additions and 9 deletions
|
|
@ -49,7 +49,12 @@ module Admin
|
|||
typelength += myevent.event_type.length
|
||||
@totallength += myevent.event_type.length
|
||||
end
|
||||
@eventstats[mytype.title] = { 'count' => events_mytype.count, 'length' => events_mytype.count * mytype.length } if @eventstats[mytype.title] == nil
|
||||
|
||||
if @eventstats[mytype.title] == nil
|
||||
@eventstats[mytype.title] = { 'count' => events_mytype.count,
|
||||
'length' => events_mytype.count * mytype.length }
|
||||
end
|
||||
|
||||
tmp = { "#{mystate.name}" => { 'type_state_count' => events_mytype_mystate.count,
|
||||
'type_state_length' => typelength } }
|
||||
@eventstats[mytype.title].merge!(tmp)
|
||||
|
|
@ -108,7 +113,8 @@ module Admin
|
|||
@event.update_attribute(:difficulty_level_id, params[:difficulty_level_id])
|
||||
end
|
||||
|
||||
if @event.submitter.update_attributes!(params[:user]) && @event.update_attributes!(params[:event])
|
||||
if @event.submitter.update_attributes!(params[:user]) && @event.
|
||||
update_attributes!(params[:event])
|
||||
flash[:notice] = "Successfully updated #{@event.title}."
|
||||
else
|
||||
flash[:notice] = 'Update not successful.'
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ class DatatableSupporters < Datatable
|
|||
items.each do |i|
|
||||
item = []
|
||||
if i.name.blank?
|
||||
unless i.registration.nil? || i.registration.user.nil?
|
||||
if !i.registration.nil? && !i.registration.user.nil?
|
||||
item << i.registration.user.name
|
||||
else
|
||||
item << "Unknown"
|
||||
item << 'Unknown'
|
||||
end
|
||||
|
||||
else
|
||||
|
|
@ -15,10 +15,10 @@ class DatatableSupporters < Datatable
|
|||
end
|
||||
|
||||
if i.email.blank?
|
||||
unless i.registration.nil? && i.registration.user.nil?
|
||||
if !i.registration.nil? && !i.registration.user.nil?
|
||||
item << i.registration.user.email
|
||||
else
|
||||
item << "Unknown"
|
||||
item << 'Unknown'
|
||||
end
|
||||
|
||||
else
|
||||
|
|
@ -35,6 +35,6 @@ class DatatableSupporters < Datatable
|
|||
end
|
||||
|
||||
def columns
|
||||
["name", "email", "name", "name", "name"]
|
||||
['name', 'email', 'name', 'name', 'name']
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ class User < ActiveRecord::Base
|
|||
private
|
||||
|
||||
def biography_limit
|
||||
errors.add(:abstract, 'cannot have more than 150 words') if !biography.nil? &&
|
||||
errors.add(:abstract, 'cannot have more than 150 words') if biography &&
|
||||
biography.split.size > 150
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
= render 'devise/shared/openid'
|
||||
|
||||
= f.inputs name: 'Account' do
|
||||
= f.input :email, :required => false, :input_html => {autocomplete: "off"}
|
||||
= f.input :email, required: false, input_html: {autocomplete: "off"}
|
||||
= f.input :password, hint: "(Leave blank if you don't want to change it)", input_html: {autocomplete: 'off'}
|
||||
= f.input :password_confirmation, input_html: {autocomplete: 'off'}
|
||||
= f.input :current_password, input_html: {autocomplete: 'off'},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue