-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bump to 3-1-stable #3
base: master
Are you sure you want to change the base?
Conversation
|
||
def index | ||
render | ||
@csv_table = CSV.open(SAMPLE_CSV_FILES[:sample_order_file], headers: true).read if File.exists? SAMPLE_CSV_FILES[:sample_order_file] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change the name of this constant
end | ||
|
||
def download_sample_csv | ||
send_file SAMPLE_CSV_FILE | ||
send_file SAMPLE_CSV_FILES[:sample_order_file] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use send_data here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming issue
begin | ||
loader = DataShift::SpreeEcom::ShopifyOrderLoader.new(Spree::Order, { verbose: true }) | ||
loader.perform_load(SAMPLE_CSV_FILES[:sample_order_file]) | ||
flash[:success] = Spree.t(:successfull_import, resource: 'Orders') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please inherit this from model name
begin | ||
loader = DataShift::SpreeEcom::ShopifyOrderLoader.new(Spree::Order, { verbose: true }) | ||
loader.perform_load(params[:csv_file].path) | ||
flash[:success] = Spree.t(:successfull_import, resource: 'Orders') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:ditto:
@@ -1,52 +1,60 @@ | |||
class Spree::Admin::OrderImportsController < Spree::Admin::BaseController | |||
SAMPLE_CSV_FILE = Rails.root.join("sample_csv", "orders_export_multiple_paid-fulfilled.csv") | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use scope for internationalization.
class DataResetService | ||
|
||
def reset_users(users = []) | ||
users = Spree::User.non_admins.all unless users.present? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all
not required here
…es for listing and forms of import
…nfiguration Add enable/disable configuration for resetting of data and add UI fix…
No description provided.