ankitbparekh.blogspot.com
July 2011 | Ankit working with Rails
http://ankitbparekh.blogspot.com/2011_07_01_archive.html
Ankit working with Rails. Interesting thoughts for ruby and rails development. Archive for July 2011. Multiple database connections in rails. Friday, July 29, 2011. One of my colleague has done multiple db connection in rails. Here is his work,. First set connection parameters for both database with different constant variables and define in environment file. Add connection.rb file in lib folder. ActiveRecord: Base.establish connection(. Include connection file and set DATABASE in models.
ankitbparekh.blogspot.com
jQuery Ajax Rails 3 - WARNING: Can't verify CSRF token authenticity | Ankit working with Rails
http://ankitbparekh.blogspot.com/2013/09/jquery-ajax-rails-3-warning-cant-verify.html
Ankit working with Rails. Interesting thoughts for ruby and rails development. JQuery Ajax Rails 3 - WARNING: Can't verify CSRF token authenticity. Tuesday, September 17, 2013. WARNING: Can't verify CSRF token authenticity. This warning appears while I'm trying to do jQuery ajax request. I have faced this issue while upgrading my older rails app to rails 3.2. This issue solved by adding bellow lines in head section in layout of application for me. Csrf meta tag %. Javascript tag do %. Fetch image in ruby.
ankitbparekh.blogspot.com
How to convert Time from/to epoch time in ruby | Ankit working with Rails
http://ankitbparekh.blogspot.com/2013/04/how-to-find-epoch-time-in-ruby.html
Ankit working with Rails. Interesting thoughts for ruby and rails development. How to convert Time from/to epoch time in ruby. Monday, April 15, 2013 ·. Posted in epoch time. Epoch time in 13 digit. Epoch time in miliseconds. In ruby, we can find time from/to epoch time as below:. To find current epoch time in seconds. 10 digit) use below code,. Current epoch time =( Time.now.to i). Current epoch time =( Time.now.to f).ceil. To find current epoch time in mili-seconds. 13 digit) use below code,.
ankitbparekh.blogspot.com
October 2009 | Ankit working with Rails
http://ankitbparekh.blogspot.com/2009_10_01_archive.html
Ankit working with Rails. Interesting thoughts for ruby and rails development. Archive for October 2009. Remove first line from any readable file. Thursday, October 29, 2009. Code to use in ruby. Filename = "/path-to/file/file.ext". Fileopen(filename,"r"){ f f.gets; text=f.read}. Fileopen(filename,"w "){ f f.write(text)}. Make sure that variable. Should be in lowercase. If you want a variable in uppercase then you have to declare it outside the def/method. Thursday, October 8, 2009 ·. Tag, simply use.
ankitbparekh.blogspot.com
June 2010 | Ankit working with Rails
http://ankitbparekh.blogspot.com/2010_06_01_archive.html
Ankit working with Rails. Interesting thoughts for ruby and rails development. Archive for June 2010. Custom Ordered Error Messages in Rails. Friday, June 25, 2010 ·. Posted in custom ordered message rails. In rails 2, if you want custom messages in ordered style then,. You have to install plugin from. Http:/ orderederrors.rubyforge.org/. And use below lines in views (it's an example). Error messages for(:user, :order= [:name,:email]). Error messages for(:user, :order= {:user= [:name,:email,:contact]}).
ankitbparekh.blogspot.com
March 2012 | Ankit working with Rails
http://ankitbparekh.blogspot.com/2012_03_01_archive.html
Ankit working with Rails. Interesting thoughts for ruby and rails development. Archive for March 2012. Fetch Images from Web Url. Wednesday, March 21, 2012 ·. Posted in fetch image in ruby. You can find images from given web-url by using following code:. For this first you need to write below statements in your .rb file. Now use below code:. Return [] if url.nil? Url content = open(url). Url data = Nokogiri: HTML(url content). Url data.xpath("/html/body/ img").each do img. Src : File.join(url,src).
ankitbparekh.blogspot.com
April 2010 | Ankit working with Rails
http://ankitbparekh.blogspot.com/2010_04_01_archive.html
Ankit working with Rails. Interesting thoughts for ruby and rails development. Archive for April 2010. Unknown runtime error in prototype.js Line: 2457. Thursday, April 15, 2010 ·. Posted in prototype error. This statement in prototype.js (line 2457):. Else element.innerHTML = content.stripScripts();. Gives an error : "unknown runtime error". To solve this problem, just make below changes in your code in all js. Change the statement from. Thismonth year label.update(Date.months[m]);. Fetch image in ruby.
ankitbparekh.blogspot.com
September 2013 | Ankit working with Rails
http://ankitbparekh.blogspot.com/2013_09_01_archive.html
Ankit working with Rails. Interesting thoughts for ruby and rails development. Archive for September 2013. JQuery Ajax Rails 3 - WARNING: Can't verify CSRF token authenticity. Tuesday, September 17, 2013. WARNING: Can't verify CSRF token authenticity. This warning appears while I'm trying to do jQuery ajax request. I have faced this issue while upgrading my older rails app to rails 3.2. This issue solved by adding bellow lines in head section in layout of application for me. Csrf meta tag %.
SOCIAL ENGAGEMENT