ruby tag

542 questions


1 answers
77 views
0
To Prevent Copying Text Displayed in TkText

I use ruby's TkText to display the text and use bind to right-click and move the mouse.Is it possible to prohibit copying text using the mouse?You can set state to disabled to prevent text editing, bu...

2 years ago

1 answers
82 views
0
During a one-to-many relationship, the attributes method is not available and the following error occurs:NoMethodError: undefined method `attributes' for #Answere::ActiveRecord_Associations_CollectionProxy

The following relationship models are available:class question has_many —answares accepts_nested_attributes_for —answaresendclass Answer belongs_to:questionendUnder these assumptions, within the contr...

2 years ago

1 answers
84 views
0
The error Uncaught TypeError: Cannot read property '_calendar' of undefined when implementing in fullcalendar-rails gem.

I have implemented it by referring to the code below.https://github.com/siguremon/calendarclone/blob/master/app/assets/javascripts/calendar.jsHowever, due to the old version, the following version is ...


1 answers
59 views
0
US>To view the character code?

If ruby takes data from the database and puts it into standard output such as p, it will display \xB8\xB8\xB8.The program itself is working well, but debugging is difficult, so I want to be able to co...

2 years ago

1 answers
72 views
0
How to retrieve the item model with like_user included

I'm making api with rails, but I can't design it the way I want to, so I'd like to ask you a question.I'd like to get multiple Item models in Tag models including item model like_users (users who like...

2 years ago

3 answers
77 views
0
I want to use the current_page? in the rails controller.

If you use current_page?(hoge_path) in the controller, you will get the following error: undefined method `current_page?'How should I determine the path within the controller?

2 years ago

3 answers
72 views
0
To aggregate the latest records by user_id

I want Rails to prepare an ActiveRecord::Relation object to pass to view, but I can't aggregate it as intended. It's to aggregate the latest records for each user_id.There is an entrance/exit model ca...


1 answers
95 views
0
Can I use css locator to return text as a partial match?

ex)<a class=sample id=sample_id href=../>sample text</a>You can use either css or xpath to retrieve elements by specifying xpath, as shown below.exist?(xpath:'//a[@class=sample]')exist?(cs...

2 years ago

4 answers
71 views
0
code to be added to an array for return values

def hoge(array) res = [ ] array.each do | data | value = data.fuga res<<value end resendI end up doing this, but I don't think the second, fifth, and seventh lines are ruby-like.The scene where ...

2 years ago

1 answers
73 views
0
http://localhost:3000/bookmarks is not displayed.

I'm studying Ruby on rails, but I'm using http://localhost:3000/bookmarks to create TODOLIST apps.However, when I accessed the above URL while working on it, it was not displayed anymore.Could you tel...

2 years ago
« - 10 - »

© 2024 OneMinuteCode. All rights reserved.