Questions tagged as 'ruby-on-rails'

0
answers

Send Email with Ruby

Good evening! The scenario I encounter is as follows: I have a screen that shows a form already filled out. At the bottom of the screen, there is a button to send the link from form via email. And that's where magic happens: I use AJAX via...
asked by 30.06.2018 / 02:28
0
answers

I need to create exceptions that do something by default and have the same behavior as the StandartError

Hello, I work with Rails and use Sentry to automatically log in to my applications. When an exception is thrown the error is not generated, so I have to force capture of the error through the command: Raven.captureMessage(e.message, level:...
asked by 11.06.2018 / 16:17
0
answers

undefined method 'user_id' for #User: 0x00000006434580 rails admin ruby 4

My application is experiencing the following error: undefined method 'user_id' for # If you want to use a RailsAdmin virtual field (= a field without corresponding instance method), you should declare 'formatted_value' in the field definitio...
asked by 21.06.2018 / 15:20
1
answer

How to make a table in a scaffold rails with the attributes of another scaffold

Personal I'm having a hard time! I created a scaffold called book and one called Loans then I created a report call in the report I want to search for books for books. I'm using gem ransack to do searches within the same scaffold, but as in t...
asked by 07.06.2018 / 18:37
1
answer

Search with Ruby on Rails to generate a report

Well I have a project with scaffolds of books and loans and I need to do a search for a specific book and as a result show all the loans in that book had I have no idea how to start doing this.
asked by 17.05.2018 / 20:58
1
answer

Text area with image

Hello, I'm going to make a form and I do not know how to do it to include an image inside the text area, something like that. TEXT TEXT IMAGE TEXT Something of a kind for the include user to know? As it is done here in stack ov...
asked by 02.06.2017 / 13:27
1
answer

Direct button depending on whether the user is logged in or not

I have a button that takes to another screen, but if the user is not logged in the system it should redirect to the login screen and not to the one that is already going. Can you do it right on link_to? li= link_to 'Anuncie', new_subscription_...
asked by 09.05.2018 / 21:47
1
answer

RoR Create and Update

I am developing a system in ROR and I have a news table in the bank, being that there is a highlight column and every time the admin registers another notice as highlight even if there is already one in the bank, the controller has to remove the...
asked by 10.05.2018 / 15:30
2
answers

Hosting Ruby application with Sinatra

I'm starting my studies in Ruby with DSL Sinatra. For this I installed Node.js then ruby with Sinatra. My applications locally are working normally. But I would like to make them available for web browsing. (so you can place the call anywhere...
asked by 21.05.2018 / 16:30
0
answers

Rails has_many through with where clause

I need help with the following problem: Is it possible that my Analysis model has_many :klasses, through: :subjects , but being filtered by attributes of the join_table AnalysisSubject? Or should my modeling be any different? class An...
asked by 07.05.2018 / 05:43