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 |
Please explain the three levels of access control for ruby methods?
Tell us what is class libraries in ruby?
Explain ruby data types.
Tell us the types of variables available in ruby class?
Explain the use of ensure statement in Ruby?
Tell me what is the difference between ruby 1.9 and ruby 2.0?
What's the difference in scope for these two variables: @name and @@name?
Mention what is the difference between a gem and a plugin in ruby?
Where does a scope change in a ruby program?
How would you freeze an object in ruby?
Tell me what is the difference between calling super and calling super()?
What is a struct in ruby?