Tell me how you can create a controller for subject?
Answer / Rajkumar
{"controller": "To create a controller in Ruby on Rails, follow these steps: 1. Generate the controller using the command `rails generate controller Subject`, where 'Subject' is your desired controller name.n2. Run the migration to create the associated database table for your controller (if needed) by executing `rails db:migrate`.n3. Open the newly created file in the app/controllers directory and define the methods you want for your controller."}
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain about variables?
Explain about methods?
Explain ruby ranges. What are the ways to define ranges?
What is sysread method in Ruby?
Explain about class libraries in ruby?
Explain ruby strings.
Tell me what does ruby name refers to?
Explain me what is the difference between symbol and string?
Explain retry statement in ruby.
How do you handle exceptions in ruby code?
Do you know how ruby looks up a method to invoke?
How to check whether a directory exist or not in Ruby?