ruby tag

542 questions


2 answers
36 views
0
I would like to create a table similar to the following as helper using content_tag.

When creating a table in rails such as the following, I always implement it using if statements.*It is written in slimcategories/index.html.slim- if store.categories.present? - store.categories.each d...

2 years ago

1 answers
38 views
0
If you save a model that is in a parent-child relationship at the same time, it is rolled back by validates:user_id, presence:true.

Perform the following actions with the following model structure: tweet=Tweet.createuser=User.newuser.likes.build(tweet_id:tweet.id)user.saveThen it becomes Like is invalid and rolls back.When buildin...

2 years ago

1 answers
35 views
0
processing of coordinates in a file

I would like to use ruby to process the file with the following coordinates, but I can't think about what to do, so I'm at a standstill.Could you give me an idea?Before Processing group start end id d...

2 years ago

1 answers
74 views
0
Please tell me how to deploy the Sinatra app using MeCab to Heroku.

There was a similar question, but there was no answer, so I would like to ask you a question.As the title suggests, we are trying to deploy the Sinatra app using MeCab to Heroku.local PC:Mac OSX $hero...


2 answers
50 views
0
If there is a form between table and th and td, the confirm dialog will not appear.

I am developing it at Ruby on Rails. button_to 'delete', xxxx_path(xxx.id), method: :delete,confirm: 'Do you really want to delete it?'#=><input class=Button data-confirm=Are you sure you want t...


1 answers
102 views
0
Understanding the Use of Bundler to Manage Gems for Multiple Projects

If I'm developing two projects on my PC and I use the same version of rails, installing the same version of rails in the directory of each project is a waste of capacity, but what do you think?


1 answers
36 views
0
I want to check the parent-child relationship of the model on Ruby.

We analyze the parent-child relationship (dependent relationship) on the ER diagram to see if it really is on Ruby's source.However, I don't know how to determine which model is associated with a pare...

2 years ago

1 answers
69 views
0
What is the specification (behavior) of `rbenv exec`?

capistrano-rbenv was looking at the repository.Therefore, I think this gem is expecting rbenv exec to execute the rails command.On the other hand, I believe that this rbenv exec command does not descr...

2 years ago

3 answers
65 views
0
I want to handle JSON::ParserError

I'm creating a website with rails.Among them is the process of parsing JSON.I'm saying this very well, but if you intentionally give me a strange character, I get JSON::ParserError and I get an error ...

2 years ago

1 answers
98 views
0
I can't read rubocop under bundle

bundle exec rubocop seems to be using an older version of rubocop, but how can I use the rubocop managed by the bundleer?$bundle exec rubocop-vwarning: parser/current is loading parser/ruby22, which r...

2 years ago
« - 32 - »

© 2024 OneMinuteCode. All rights reserved.