You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
to start the application. Now visit [localhost:3000](http://localhost:3000/) and you should see the canonical **Yay! You're on Rails!** screen!
84
53
85
-
```ruby
86
-
gem 'matestack-ui-core'
87
-
```
54
+
## Install Matestack
88
55
89
-
to your Gemfile and run
90
-
91
-
```sh
92
-
bundle install
93
-
```
56
+
To install matestack, run `gem install matestack-ui-core` or add `gem 'matestack-ui-core'` to your Gemfile and run `bundle install`.
94
57
95
-
For a complete setup with Webpacker, you also need to run `yarn add https://github.com/matestack/matestack-ui-core#v0.7.6` followed by `yarn install`.
58
+
For a complete setup with Webpacker, you also need to run `yarn add https://github.com/matestack/matestack-ui-core#v1.0.0` followed by `yarn install`.
96
59
97
60
Then, add
98
61
@@ -108,15 +71,15 @@ bin/webpack
108
71
109
72
to compile your JavaScript code.
110
73
111
-
In order to complete the `matestack-ui-core` setup, change your `app/controllers/application_controller.rb` to look like this
74
+
In order to use matestack complete the setup by including the `Matestack::Ui::Core::ApplicationHelper` in your `ApplicationController`. Your `app/controllers/application_controller.rb`should look like this:
and the `app/views/layouts/application.html.erb` to look like this:
82
+
And add an element with the id `matestack_ui` to your layout, by changing your `app/views/layouts/application.html.erb`. It should look like this:
120
83
121
84
```html
122
85
<!DOCTYPE html>
@@ -138,7 +101,7 @@ and the `app/views/layouts/application.html.erb` to look like this:
138
101
</html>
139
102
```
140
103
141
-
Background: You now can use `matestack` helpers in your controller actions, and your `matestack` apps (and the corresponding pages) get rendered into your application layout!
104
+
By including the `Matestack::Ui::Core::ApplicationHelper` and defining a div with the `matestack_ui` id you can now use matestacks render method in your controller actions. Based on the id matestack apps and pages can be rendered and pages can be replaced without a full reload of the browser page.
142
105
143
106
## Add a demo page
144
107
Within your `app` directory, create a directory called `matestack` - this is where `matestack`**apps**, **pages** and, later on, **components**, will live.
0 commit comments