Skip to content

Commit

Permalink
Fix 3 points
Browse files Browse the repository at this point in the history
  • Loading branch information
bricesanchez committed Aug 28, 2017
1 parent ec63331 commit 496b8d8
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion doc/guides/1 - Getting Started/2 - Getting Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ NOTE: This step may take some time to load as it needs to download and
install all the ruby gems Refinery depends on.

NOTE: If *gem install refinerycms* fails with an error message saying
*ERROR: While executing gem (Gem::ImpossibleDependenciesError)*, run
*ERROR: While executing gem ... (Gem::ImpossibleDependenciesError)*, run
*gem install rails -v=3.2.15* then *gem install refinerycms*

TIP. If you're working on Windows, you should be aware that the vast
Expand Down
4 changes: 2 additions & 2 deletions doc/guides/2 - Refinery Basics/8 - Extending Models.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Next, run:
$ rake db:migrate
```

to update your schema.
... to update your schema.

## Create a Decorator

Expand All @@ -59,7 +59,7 @@ end
There is some additional explanation needed for the following line:

```ruby
Refinery::Page.class_eval do end
Refinery::Page.class_eval do ... end
```

This is what opens the model to manipulation. This essentially tells Ruby to reopen the model as if you were writing methods inside the class itself. Anything between the `do` and `end` will change the way the model works. You can even re-define existing methods and these will take precedence over the previously-written ones.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Dragonfly urls contain the information dragonfly needs to produce an image of th
/system/images/W1siZiIsIjIwMTUvMDQvMjEvNjRlZ2d5MjJzcl9CdWxsd2lua2xlLmpwZyJdLFsicCIsInRodW1iIiwiMjI1eDI1NVx1MDAzZSJdXQ/Bullwinkle.jpg?sha=6ce3368c333342ff
```

The long string is a base64 encoded string. I used [base64decode.com](https://www.base64decode.org/) to translate "W1.dXQ" into
The long string is a base64 encoded string. I used [base64decode.com](https://www.base64decode.org/) to translate "W1....dXQ" into

```ruby
[["f","2015/04/21/64eggy22sr_Bullwinkle.jpg"],["p","thumb","225x255\u003e"]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ __WARNING__: This only works on Refinery versions 2.0.0 and greater.
Refinery ships with an extension generator that makes adding your own functionality a breeze. It works just like the Rails scaffold generator.

```shell
$ rails generate refinery:engine singular_model_name attribute:type [attribute:type ]
$ rails generate refinery:engine singular_model_name attribute:type [attribute:type ...]
```

__TIP__: to see all the options supported by the `refinery:engine` generator just run `rails g refinery:engine`.
Expand Down Expand Up @@ -76,7 +76,7 @@ This results in the following:
create vendor/extensions/events/lib/tasks/events.rake
create vendor/extensions/events/readme.md
create vendor/extensions/events/refinerycms-events.gemspec
...
------------------------
Now run:
bundle install
Expand Down Expand Up @@ -126,7 +126,7 @@ The first two lines indicate that the extension is namespaced using `Refinery::E
Running this command will produce the following output:
```shell
...
create vendor/extensions/events/app/controllers/admin/places_controller.rb
create vendor/extensions/events/app/controllers/places_controller.rb
create vendor/extensions/events/app/models/place.rb
Expand Down Expand Up @@ -158,7 +158,7 @@ Running this command will produce the following output:
create vendor/extensions/events/refinerycms-places.gemspec
create vendor/extensions/events/spec/models/place_spec.rb
append vendor/extensions/events/lib/refinerycms-events.rb
...
------------------------
Now run:
bundle install
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Run the commands listed above to actually create your files and migrate the data

## Linking Event to EventType in our database

Since we've already created the `Event` model (as part of the "Multiple Resources" guide), we'll have to manually add the`event_type_id` column to the `refinery_events` table:
Since we've already created the `Event` model (as part of the "Multiple Resources..." guide), we'll have to manually add the`event_type_id` column to the `refinery_events` table:

```shell
$ rails generate migration AddEventTypeToRefineryEvents event_type_id:integer
Expand Down Expand Up @@ -186,7 +186,7 @@ end

## Modifying the Controller to gather information for our sub-table

Ultimately, we will need some collection of "event types" in our `Events` view that collection is what we'll use to create the select box. So, to make that happen, the best (and most proper) way is to modify the `Events` controller so that it automatically creates an `@event_types` variable that we'll use in the view.
Ultimately, we will need some collection of "event types" in our `Events` view... that collection is what we'll use to create the select box. So, to make that happen, the best (and most proper) way is to modify the `Events` controller so that it automatically creates an `@event_types` variable that we'll use in the view.

Open up `vendor/extensions/events/app/controllers/refinery/events/admin/events_controller.rb` and look at its contents:

Expand Down
2 changes: 1 addition & 1 deletion doc/guides/7 - Hosting and Deployment/1 - Heroku.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Watch the output for these lines:
```shell
Creating Heroku app..
Running: cd /path/to/app/myapp && heroku create
Creating random-site-name.. done
Creating random-site-name..... done
Created http://random-site-name.herokuapp.com/
```

Expand Down

0 comments on commit 496b8d8

Please sign in to comment.