8
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/generators/pixelforce_cms/contact_us_generator.rb', line 8
def create_model
copy_file "contact_us.rb", "app/models/contact_us.rb"
copy_file "contacts_controller.rb", "app/controllers/contacts_controller.rb"
template "notification.rb", 'app/mailers/notification.rb'
create_file "app/views/notification/notify_us.text.haml"
route_config = %q(
get '/contact', to: 'contacts#new', as: :conatct
post '/contact', to: 'contacts#create'
)
inject_into_file 'config/routes.rb', "\n#{route_config}\n", { :after => '::Application.routes.draw do', :verbose => false }
end
|