Skip to content

Commit

Permalink
Route update, button path update, and faker downgrade for awful autoc…
Browse files Browse the repository at this point in the history
…omplete bug faker-ruby/faker#1610
  • Loading branch information
dgcliff committed May 22, 2019
1 parent ec7ec90 commit d8e2859
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .version
@@ -1 +1 @@
0.3.179
0.3.180
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -47,6 +47,6 @@ group :test do
end

group :development, :test do
gem 'faker'
gem 'faker', '1.9.1'
gem 'listen'
end
4 changes: 2 additions & 2 deletions Gemfile.lock
Expand Up @@ -161,7 +161,7 @@ GEM
factory_bot_rails (5.0.1)
factory_bot (~> 5.0.0)
railties (>= 4.2.0)
faker (1.9.3)
faker (1.9.1)
i18n (>= 0.7)
faraday (0.15.4)
multipart-post (>= 1.2, < 3)
Expand Down Expand Up @@ -467,7 +467,7 @@ DEPENDENCIES
devise-guests
enumerations
factory_bot_rails
faker
faker (= 1.9.1)
font-awesome-rails
haml-rails
jquery-rails
Expand Down
4 changes: 4 additions & 0 deletions app/controllers/projects_controller.rb
Expand Up @@ -35,6 +35,10 @@ def users
@roles = @project.roles.order(sort_column + ' ' + sort_direction)
end

def new_user; end

def create_user; end

def sort_column
return 'designation' unless params[:sort]

Expand Down
4 changes: 2 additions & 2 deletions app/views/projects/users.html.haml
Expand Up @@ -28,10 +28,10 @@
%h4.card-title Add an existing user
%p.card-text Select an existing Charon user to attach to this project.
.card-footer
%a.btn.btn-lg.btn-block.btn-primary{:href => "/projects/new", :role => "button"} Add
%a.btn.btn-lg.btn-block.btn-primary{:href => project_create_user_path(@project.noid), :role => "button"} Add
.card
.card-body
%h4.card-title Create a user
%p.card-text Make a new user who will then be attached to this project.
.card-footer
%a.btn.btn-lg.btn-block.btn-primary{:href => admin_new_user_path, :role => "button"} Create
%a.btn.btn-lg.btn-block.btn-primary{:href => project_new_user_path(@project.noid), :role => "button"} Create
2 changes: 2 additions & 0 deletions config/routes.rb
Expand Up @@ -58,5 +58,7 @@

# user registry
get '/projects/:project_id/users', to: 'projects#users', as: 'project_users'
get '/projects/:project_id/new_user', to: 'projects#new_user', as: 'project_new_user'
get '/projects/:project_id/create_user', to: 'projects#new_user', as: 'project_create_user'

end

0 comments on commit d8e2859

Please sign in to comment.