Posts by Henrique Max • 95 points
6 posts
-
0
votes1
answer79
viewsA: How to make a Seed.Rb by randomly searching Sqlite data in Rails?
In my case I solved it here like this: city_id: City.order("RANDOM()").first.id, state_id: State.order("RANDOM()").first.id,
-
1
votes1
answer79
viewsQ: How to make a Seed.Rb by randomly searching Sqlite data in Rails?
Since I already have a register of cities and states, which you can see below, my question is the following, how can I place within the function 10.times in the lines of address_city and…
-
2
votes3
answers1108
viewsA: Why isn’t Vagrant synchronizing the folders?
I solved the problem using another box I found in vagrantcloud. First I set up on Mac, after everything working, I managed a box (package) and went to Windows8, I did the normal procedure and it…
-
0
votes1
answer355
viewsQ: How to generate sequential numbers automatically with current year in Rails?
I need that when a new product is created it generates a number ex: 0001/2015 numero/ano_in effect and when it changes year back to zero. I made a helper just to format the number in the views, but…
-
4
votes3
answers1108
viewsQ: Why isn’t Vagrant synchronizing the folders?
I’m using: Windows 8 64 bits Vagrant 1.7.2 Virtual box 4.3.28 GitBash 1.9.4 para conexão SSH Box Ubuntu 14.04.02 Trusty 32 bits Box Ubuntu 14.04.02 Trusty 64 bits I am developing with Ruby on Rails,…
-
2
votes2
answers190
viewsQ: Rails Console does not load the methods and classes of my application, why?
I have a model called Person, when I open the Rails Console and try to assign it to any variable, I get this: user.localapp (test) $ rails c Loading development environment (Rails 4.2.0) (Ruby…