Search
 
SCRIPT & CODE EXAMPLE
 

RUBY

how to generate a controller in rails

$ rails generate controller Greetings hello
	 
     # Below are the files this generator creates
     # hello would create a view file
     # to create the controller without creating the view file enter:
     # rails generate controller Greetings
     
     create  app/controllers/greetings_controller.rb
      route  get 'greetings/hello'
     invoke  erb
     create    app/views/greetings
     create    app/views/greetings/hello.html.erb
     invoke  test_unit
     create    test/controllers/greetings_controller_test.rb
     invoke  helper
     create    app/helpers/greetings_helper.rb
     invoke    test_unit
     invoke  assets
     invoke    scss
     create      app/assets/stylesheets/greetings.scss
Comment

PREVIOUS NEXT
Code Example
Ruby :: rename column in db rails 
Ruby :: rails activerecord to hash 
Ruby :: sort array of hashes ruby 
Ruby :: how to create 2 dimensional array in ruby 
Ruby :: add edit or --wait for rails credentials edit windows 
Ruby :: ruby read stdin 
Ruby :: rails catch mail error 
Ruby :: rails rescue puts error 
Ruby :: ruby each do method 
Ruby :: ruby array remove by index 
Ruby :: rails parse boolean 
Ruby :: rails keep all params except for some 
Ruby :: ruby hash loop 
Ruby :: string to hash ruby 
Ruby :: ruby includethis or that 
Ruby :: ruby on rails scaffold generator example with belongs to relationship 
Ruby :: ruby abs method 
Ruby :: ruby on rails 
Ruby :: linker command failed with exit code 1 ruby 
Ruby :: ||= ruby 
Ruby :: ruby array infinity 
Ruby :: ruby pdf to file 
Ruby :: rails api render show page with id 
Ruby :: update_all 
Ruby :: time loop start with non zero in ruby 
Ruby :: how to use custom switch in rails 
R :: r list files in directory 
R :: i have library(dplyr) but i still get Error in select(., 
R :: read csv online r 
R :: r - remove NA 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =