Skip to content

upgraded to version 3 of react on rails #222

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.3
2.2.4
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language:
- ruby
rvm:
- 2.2.3
- 2.2.4
sudo: false
addons:
apt:
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
source "https://rubygems.org"
ruby "2.2.3"
ruby "2.2.4"

#
# Bundle edge Rails instead: gem "rails", github: "rails/rails"
Expand Down Expand Up @@ -37,7 +37,7 @@ gem "sdoc", group: :doc
# Use Rails Html Sanitizer for HTML sanitization
gem "rails-html-sanitizer"

gem "react_on_rails"
gem "react_on_rails", git: "[email protected]:shakacode/react_on_rails.git", tag: "3.0.0-beta.1"

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem "therubyracer"
Expand Down
19 changes: 13 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
GIT
remote: [email protected]:shakacode/react_on_rails.git
revision: 562c58f2b37e13cecc86fd4bd4e85edb10acd86d
tag: 3.0.0-beta.1
specs:
react_on_rails (3.0.0.beta.1)
connection_pool
execjs (~> 2.5)
foreman
rails (>= 3.2)
rainbow (~> 2.1)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -201,11 +213,6 @@ GEM
rake (10.5.0)
rdoc (4.2.1)
json (~> 1.4)
react_on_rails (2.3.0)
connection_pool
execjs (~> 2.5)
rails (>= 3.2)
rainbow (~> 2.1)
ref (2.0.0)
rest-client (1.8.0)
http-cookie (>= 1.0.2, < 2.0)
Expand Down Expand Up @@ -345,7 +352,7 @@ DEPENDENCIES
rails-html-sanitizer
rails_12factor
rainbow
react_on_rails
react_on_rails!
rspec-rails
rspec-retry
rubocop
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ See package.json and Gemfile for versions
1. Be sure that you have Node installed! We suggest [nvm](https://github.com/creationix/nvm), with node version `v5.0` or above. See this article [Updating and using nvm](http://forum.shakacode.com/t/updating-and-using-nvm/293).
1. `git clone [email protected]:shakacode/react-webpack-rails-tutorial.git`
1. `cd react-webpack-rails-tutorial`
1. Check that you have Ruby 2.2.3
1. Check that you have Ruby 2.2.4
1. Check that you're using the right version of node. Run `nvm list` to check.
1. Check that you have Postgres installed. Run `which postgres` to check.
1. `bundle install`
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/pages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def index
# compared to he view. However, it's more convenient to use Jbuilder from the view. See
# app/views/pages/index.html.erb:20
#
# <%= react_component('App', render(template: "/comments/index.json.jbuilder"),
# <%= react_component('App', props: render(template: "/comments/index.json.jbuilder"),
# prerender: true) %>
#
#
Expand Down
2 changes: 1 addition & 1 deletion app/views/pages/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<a href="https://github.com/shakacode/react_on_rails">react_on_rails gem</a>)</h2>
<%= render "header" %>

<%= react_component('RouterApp', render(template: "/comments/index.json.jbuilder"),
<%= react_component('RouterApp', props: render(template: "/comments/index.json.jbuilder"),
prerender: true, raise_on_prerender_error: true) %>
2 changes: 1 addition & 1 deletion app/views/pages/no_router.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<a href="https://github.com/shakacode/react_on_rails">react_on_rails gem</a>)</h2>
<%= render "header" %>

<%= react_component('App', render(template: "/comments/index.json.jbuilder"),
<%= react_component('App', props: render(template: "/comments/index.json.jbuilder"),
prerender: false) %>
2 changes: 1 addition & 1 deletion app/views/pages/simple.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
</ul>
<hr/>

<%= react_component('SimpleCommentScreen', {}, prerender: false) %>
<%= react_component('SimpleCommentScreen', props: {}, prerender: false) %>
Loading