Skip to content
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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

bump to 3-1-stable #3

wants to merge 7 commits into from

Conversation

nimish13
Copy link
Contributor

No description provided.


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]
Copy link
Member

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]
Copy link
Member

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?

Copy link
Member

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')
Copy link
Member

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')
Copy link
Member

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")

Copy link
Member

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?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all not required here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants