Skip to content
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 CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ Syntax guidelines:
* `my_method(my_arg)` or `my_method` and _not_ `my_method( my_arg )`
* `a = b` and not `a=b`.
* Aim for 1.9 hash syntax - `{ dog: "Akira", cat: "Rocky" }` rather than `{ :dog => "Akira", :pug => "Rocky" }`
* Follow the conventions you see used in the source already.
* Follow the conventions you see used in the source already.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ This should run a process which starts a server in a Docker container on your co
Rails 4.2.11 application starting in development on http://0.0.0.0:3000
```

(Optional) Note that to be able to use the page as an admin, you must first give yourself admin privileges. Make sure you have started your app and signed up as an user on your locally running app. Then run a script `bin/dadmin <your email>`.

**You can now view the app at http://localhost:3000**

You can stop the server when you're finished by typing `Ctrl + C`.
Expand Down
9 changes: 9 additions & 0 deletions bin/dadmin
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
set -e

if [ $# -gt 0 ]
then
docker-compose run --rm web rails runner "Member.find_by(email: '$@').add_role(:admin)"
else
docker-compose run --rm web rails runner "Member.last.add_role(:admin)"
fi
1 change: 1 addition & 0 deletions native-installation-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ These are the original instructions for natively installing the app to your mach
- Generate sample data
4. [Run the app](#run-the-app)
5. [Run the tests](#run-the-tests)
6. (Optional) Note that to be able to use the page as an admin, you must first give yourself admin privileges. Make sure you have started your app and signed up as an user on your locally running app. Then run this on command line: `rails runner "Member.find_by(email: '<your email>').add_role(:admin)"`.

## Set up a Ruby Environment

Expand Down