Skip to content
Permalink
Browse files

Use resources router method

  • Loading branch information...
GustavoCaso committed Feb 17, 2018
1 parent f11d7e1 commit b5f8970a4cf3cee506910fc384a0082a1c2bd6c0
@@ -4,6 +4,4 @@
# Example:
# get '/hello', to: ->(env) { [200, {}, ['Hello from Hanami!']] }
get '/', to: 'projects#index', as: :projects
get '/settings', to: 'settings#index', as: :settings
get '/settings/new', to: 'settings#new', as: :new_settings
post '/settings/create', to: 'settings#create', as: :create_settings
resources :settings, only: [:index, :new, :create]
@@ -9,4 +9,4 @@ table.table.table-hover
td = key
td = value

.new-settings = link_to 'New Settings', routes.new_settings_path
.new-settings = link_to 'New Settings', routes.new_setting_path
@@ -3,7 +3,7 @@ class New
include Admin::View

def form(settings)
form_for :setting, routes.create_settings_path do
form_for :setting, routes.settings_path, class: 'setting-form' do
label :title
text_field :title, value: settings.title

0 comments on commit b5f8970

Please sign in to comment.
You can’t perform that action at this time.