542 questions
Currently, the code is as follows:current_page?(controller: 'foo', action: 'bar')This time, I would like to increase the action (even if it is a different action).However, it doesn't work even if I wr...
I'm a beginner. This is my first question.I'm sorry for the rudiments.The class method is defined by a unique class method, but even if you execute it with the code below, You will encounter the follo...
The environment is Mac and CentOS.To run a program called ~/hoge/ruby.rb from a terminal, it usually must be $ruby~/hoge/ruby.rb.Can I do this like $hoge-option?If possible, please let me know what st...
I am creating an API using grape.(I don't use other frameworks such as ruby on rails or sinatora .grape alone.)Check the content-type of the http header in the request and determine if the value is ap...
I am developing Ruby on Rails on Macbook Air.I am studying Chapter 3 of the Ruby on Rails tutorial, but I am getting an error when I try to generate a StaticPages controller. rails generate controller...
How do I get a Time object with a random time by specifying only the date in ruby?For example, if you want a random date of 'June 22, 2016', June 22, 2016 19:44:34.
】What I want to realize したい①You want to retrieve the values of columns in tables that have a one-to-many relationship and that have a child relationship.②I want to add up what I took out and display i...
This is my first time to ask a question.I have a long question, but I will chew it up as much as possible, so I would appreciate it if you could let me know the details.In my environment, when I post ...
[ { : id=>1, —data=>1 }, { : id=>1, —data=>2 }, { : id=>2, —data=>1 }, { : id=>2, —data=>2 }]↓I want to do this[ { : id=>1, —data=>[1,2] }, { : id=>2, —data=>[1,2] ...
When retrieving data related to the model defined by has_many+through, there was a case where each data was retrieved duplicately, although there was only one data in the database.For more information...
« | - 15 - | » |
© 2024 OneMinuteCode. All rights reserved.