Skip to content

Update para usar o ReactJS#1

Open
paulopatto wants to merge 27 commits into
masterfrom
react
Open

Update para usar o ReactJS#1
paulopatto wants to merge 27 commits into
masterfrom
react

Conversation

@paulopatto

Copy link
Copy Markdown
Owner

No description provided.

Changed readme to add instructions about sidekiq startup
Now when user send sales batch file, the system process it assync
background job with Sidekiq (instead synchronous process with concern
module).

Add sidekiq.yml config file and example.
Also add routes to Sidekiq web admin (/sidekiq/)
Init feature tests with Capybara and Poltergeist (add phantomjs as
dependencie --updated README).
Changed Sidekiq backgroud job to model #before_create callback (over controller).
Add gem state_machines with ActiveRecord compatible, to save state on
database.
Enable state machine to manage sales batch workflow.

- Remove column Boolen :processed from :sales_batches table
- Add column String :state at :sales_batches table
- Add sate_machine workflow on sales bacth model
- Change sales batch worker wot use state machine
Using gem react-rails and command:

- rails g react:install

Installed react on project (react on rails)
Removin unused reference to turbolink.
Add two new ract components:

- <BatchListTable />: To represente wapper container to show batches list.
- <BatchListRow />: To represents single batch on table.

Using ECMAScript 6 with JSX templates.
Ok, maybe I should use gem 'active_model_serializers' to create custom
serialization attributes to json, but I don't want add one more
dependency. On this case I think more appropriate use
'ActiveModel::Serializers::JSON#as_json'.

Maybe this change on future, but for now, this solution solve my needs.

Read more in:

- http://api.rubyonrails.org/classes/ActiveModel/Serialization.html
- http://api.rubyonrails.org/classes/ActiveModel/Serializers/JSON.html#method-i-as_json
- http://bit.ly/2bT1ZUN
* Bump ruby version to 2.4.1 (through .ruby-version file)
* Bump Rails version to 4.2.9
* Update ignored files
Update to use package json to manage JS libs configs.
Update README with new information.
Bump gemfile.lock and remove some files.
Arquivos gerados com a instalação do webpacker...

```sh
$ bundle exec rake webpacker:install
$ bundle exec rake webpacker:install:react
$ bundle exec rails generate react:install # (not runned)
```

----

See more in   https://github.com/reactjs/react-rails
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.

1 participant