[Rails] Rails edit action getting too big

2016-02-17 Thread ajayg1567
In my current rails application , there are multiple tabs for the edit action. All tabs go to the same action. For example if i modify some input field in one tab , all the tabs parameters go to edit action.I need to send only those modified. Is there any suggestion for this scenario -- You re

Re: [Rails] Better way to write this piece of code

2016-02-17 Thread Tamara Temple
Roy Royal writes: > I use this type of code for different message and status in my api. > > def 404 > respond_to do |format| > format.json {render json: { error: '404, not found' }, status: 404} > format.xml {render xml: { error: '404, not found' }, status: 404} > end > end > > This

[Rails] need advise with geokit-rails: finding covering records

2016-02-17 Thread tom
Hi, i have a 'campaign' model which covers a location (=lat/lng +plus radius). i also have an event model, where one event happens at a specific location. now i want to know which campaigns 'covers' and event in terms of the location. any ideas appreciated. thx -- You received this messag

[Rails] Better way to write this piece of code

2016-02-17 Thread Roy Royal
I use this type of code for different message and status in my api. def 404 respond_to do |format| format.json {render json: { error: '404, not found' }, status: 404} format.xml {render xml: { error: '404, not found' }, status: 404} end end This works but can I refactoring this code,

[Rails] Re: Ruby on Rails- HTML5 Video as background for landing page not loading on heroku

2016-02-17 Thread 'Bigos' via Ruby on Rails: Talk
It will not work like this on Heroku read this and make sure you did everything right https://devcenter.heroku.com/articles/rails-asset-pipeline On Tuesday, 16 February 2016 12:11:45 UTC, Ruby-Forum.com User wrote: > > I'm trying to include a video as background in my application's landing > pag

[Rails] Rails 4 Query on Association using Includes

2016-02-17 Thread mikej
This works: Model1.includes(:model2 => :model2).where(model2s: {order: 2}) How would I write a query for order <= 2? What I would really like to write is: Model1.includes(:model2 => :model2).where(“model2s.order <= 2”) This worked in Rails 3, I would like to build up the where clause

Re: [Rails] Dynamically create databases?

2016-02-17 Thread Pedro Marques
Hello! I know three years have passed, but I am looking to do exactly what you proposed on your first post, so I am interested in knowing if you have managed to so and if you did, how did you do it? Thanks in advance. quinta-feira, 4 de Abril de 2013 às 05:24:18 UTC-4, Johan Vauhkonen escreve

[Rails] Re: Ruby on Rails- HTML5 Video as background for landing page not loading on heroku

2016-02-17 Thread Kranthi Kumar
Even I'm not sure why its working on my local machine and not on heroku. But I don't think it has something to do with my routes.rb file because it is not able to find an asset which was placed in my assets/videos folder and then precompiled. After trying so many things I did the following In my