A week ago working with a project and got a feel that my forms are being getting post more than one with random behavior, firstly i got a doubt on code bug but all was normal and then while debugging css i just saw in console that whole css has been loaded twice so this gives me a hint to the problem …
then here i start taking help of Sir Google and in one of blog i found a link that application.css or application.js use to load all files in assets folder and its getting load both compiled and non-compiled assets.
So the simple solution was to define assets for development environment by config.assets.prefix = “/devassets”
and this gives me a really relief as i have spent a lot of time in wondering the reason of forms getting multiple time posts even i tried to down grade rails to get rid of this problem but caught in more problems.
then here i start taking help of Sir Google and in one of blog i found a link that application.css or application.js use to load all files in assets folder and its getting load both compiled and non-compiled assets.
So the simple solution was to define assets for development environment by config.assets.prefix = “/devassets”
and this gives me a really relief as i have spent a lot of time in wondering the reason of forms getting multiple time posts even i tried to down grade rails to get rid of this problem but caught in more problems.
No comments:
Post a Comment