Skip to content

Instantly share code, notes, and snippets.

View santoshkosgi's full-sized avatar

santoshkosgi santoshkosgi

View GitHub Profile
@santoshkosgi
santoshkosgi / doubts
Created February 1, 2012 07:32
doubts
1.new method for derived model?
2.link_to :controller=>"hotels", :action => "show", :id=>"hotel.id"---didn't work but without mentioning controller it worked.
@santoshkosgi
santoshkosgi / to do
Created February 17, 2012 07:56
to do
delete is not working for food items
routing errors
diff b/w collec and member
some issues wid forgot password
@santoshkosgi
santoshkosgi / follow
Created February 21, 2012 14:08
follow
how the total rendering of the web pages work in rails.
wen d layout is rendered.
debug methods. at server and in the view
try different way to do the same.
try doing same if it doesn't work in views in server.
how u debug is important.
@santoshkosgi
santoshkosgi / bang functions ruby
Created February 24, 2012 09:50
bang functions ruby
modifies the called object it self
source:http://rubylearning.com/satishtalim/writing_own_ruby_methods.html
@santoshkosgi
santoshkosgi / gist:1899870
Created February 24, 2012 09:56
rals info foreign key
there is no helper method for foreign key in rails. because some databases doesn't support foreign keys like sqlite.
if u want to implement one u can define a helper method to the library
@santoshkosgi
santoshkosgi / use calender api
Created February 27, 2012 08:43
use calender api
to use google calender api call the below link with parameters
http://www.google.com/calendar/event?action=TEMPLATE&text=IPSAS Foundation - Geneva&dates=20120227T090000/20120228T170000&location=TBD, Geneva, Switzerland&details=For details visit.. http://IPSASFOUNDATIONGENEVA.doattend.com&trp=true&sprop= website:www.doattend.com&sprop=name:doattend
@santoshkosgi
santoshkosgi / gist:1923028
Created February 27, 2012 10:39
linking css files to rails
when ever there is a . in the name of the css file we need to add .css in the include_style sheet helper
@santoshkosgi
santoshkosgi / 000-default
Created March 12, 2012 09:08 — forked from madhums/000-default
passenger apache conf
# /etc/apache2/sites-enabled/000-default
PassengerMaxPoolSize 15
PassengerPoolIdleTime 0
PassengerStatThrottleRate 3600
PassengerMaxRequests 100
<VirtualHost *:80>
ServerName localhost
ServerAlias project
ps aux|grep
searchd/usr/local/bin/searchd --stop untill all process gets killed
@santoshkosgi
santoshkosgi / Associations one-many
Created March 15, 2012 10:21
Associations one-many
while adding associations(one-many) using scaffold post:references use post_id as the form field.
http://stackoverflow.com/questions/6583444/why-am-i-getting-an-association-type-mismatch?answertab=active#tab-top