D
D
Denis Ilyasov2014-03-25 12:54:35
Ruby on Rails
Denis Ilyasov, 2014-03-25 12:54:35

Strange behavior of rails - how to solve the problem?

I started writing an application on Rails 4.0.3 and noticed that when adding an order (for example), the order is saved only when I press Ctrl + S in the editor on any of the files.
Pretty strange behavior, no one encountered? This was not the case in version 3. And I don't even know how to get close to solving the problem, and even how to build a query to find similar questions in Google.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Denis Ilyasov, 2014-03-27
@ilyasovd

The problem was in scope. Perhaps this is some kind of bug?
I just removed the scope from the request and everything became normal.
scope :not_received, where.not(status: 'received')

I
iolegmlsn, 2014-03-25
@iolegmlsn

Clarify your question, it's not entirely clear what's wrong.

D
Denis Ilyasov, 2014-03-25
@ilyasovd

@TakteS you got it right, only I said something wrong. I look at the console, everything is saved in the database, so I should see the data on the output in the view, but no matter how much you refresh the page, new data is not shown until I save any file, absolutely any, even if there are no changes.
@walkman7 it's about the model, in my case it's called order.
Question - what could it be? Where to dig?

I
iolegmlsn, 2014-03-26
@iolegmlsn

Make sure you are in the development environment.
It may seem a little strange, but check the time in the system and take a closer look at the date the files were modified / created.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question