use ensure_reg_number_seq
This commit is contained in:
@ -16,7 +16,7 @@ class CsvDb
|
||||
errors.push({ member_id: row[0], email: row[9], errors: user.errors.full_messages })
|
||||
end
|
||||
end
|
||||
organization.update(reg_number_seq: (organization.members.maximum(:member_uid)))
|
||||
organization.ensure_reg_number_seq!
|
||||
errors
|
||||
end
|
||||
end
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
= form_for :dump, :url=>{:action=>"import_csv"}, :html => { :multipart => true, class: "formtastic user"} do |f|
|
||||
= form_for :dump, url: {action: "import_csv"}, html: { :multipart => true, class: "formtastic user"} do |f|
|
||||
%fieldset.inputs
|
||||
%ol
|
||||
%li.string.input.optional.stringish
|
||||
@ -7,7 +7,7 @@
|
||||
%ol
|
||||
%li.string.input.optional.stringish
|
||||
= label_tag I18n.t("active_admin.users.organization")
|
||||
= f.select :organization_id, options_for_select(Organization.all.map{ |org| [org.name, org.id] }), {}, { id: "select2", required: true }
|
||||
= f.select :organization_id, options_for_select(Organization.all.map{ |org| [org.name, org.id] }), include_blank: true
|
||||
|
||||
%fieldset.actions
|
||||
%ol
|
||||
|
||||
Reference in New Issue
Block a user