ruby tag

542 questions


1 answers
39 views
0
Why is it written in such a redundant way as to create an instance within a class method?

Currently, I want to use the library qiita-markdown to display the source code on my blog, but I didn't like the output, so I tried to fiddle with the source code inside, and I asked because it was wr...

2 years ago

2 answers
98 views
0
Unable to autoload constant controller and Uncaught SyntaxError: Unexpected token., compile error during ajax asynchronous communication

This is my first question!We are trying to apply asynchronous communication to the posting function of the posted application currently in production at ruby on rails.The create action uses response_t...


4 answers
37 views
0
I want to get any string with a delimited string for each number of characters.

In order to see the number of characters count, you want to create a string that replaces the desired string with a delimited string for each number of characters.For example, if you want to include a...

2 years ago

1 answers
38 views
0
There is an expression "cache an object" when caching, but is this object an object-oriented object?

I am studying cache by referring to the following articles.I don't understand what cache objects means.http://easyramble.com/rails-cache-fetch.htmlFor example, if you have a model called Text, Does ca...

2 years ago

1 answers
93 views
0
Hierarchical Model Form Does Not Appear

We are currently creating forms for models in hierarchical relationships.Below is the model file.post.rb has_many:itemsaccepts_nested_attributes_for —itemsitem.rb has_one:heading, dependent::destroyha...


2 answers
37 views
0
I want to make an error with ruby.

I'd like to make an error with ruby for certain results. What should I do in this case?For example, when json is retrieved by hitting webapi, an error is returned if the item error exists.

2 years ago

1 answers
41 views
0
How to Retrieve Variables from Webrick Servers Starting in Ruby

I'm a beginner at Ruby.While running the Webrick server in Ruby, I would like to see the variables that are being substituted by the server from a separate file [test.rb], but every time I look at the...

2 years ago

1 answers
43 views
0
dropzone.js (upload by drag and drop) does not work well.

. It has also been mounting as a reference for < p > or less.http://plugmin.co/436/Even if you try to drag and drop an image, file://Users/...I was unable to upload the file successfully. as described...


1 answers
35 views
0
ActiveRecord::RecordNotFound Error in show Action After Adding Search Find Action

I don't know which code is bad and I can't pick up the id.Please teach me.controller people_controller.rbclass PeopleController <ApplicationController layout 'people'def index @msg = 'Person data.'...

2 years ago

2 answers
39 views
0
How to get the last day of this month from Ruby

The code is now like this.Date.new(Time.now.year, Time.now.month, -1).dayI think I can write smarter...Please let me know if there is any other way to write.To put it further, I use it to determine wh...

2 years ago
« - 24 - »

© 2024 OneMinuteCode. All rights reserved.