Monthly Archives: December 2011

undefined method `authenticate?’ Error

while the  call to Devise’s user_signed_in? or similar, cause add the following code class ActionController::TestCase include Devise::TestHelpers end source http://pupeno.com/2010/09/26/undefined-method-authenticate/ http://www.klairvoyant.in Advertisements

Posted in rails, ROR, ruby on rails, web development | Tagged , , , | Leave a comment

CSS Buttons

1) in css file .button, .button:visited{ background: #222 url(overlay.png) repeat-x; display: inline-block; padding: 5px 10px 6px; color: #fff; text-decoration: none; -moz-border-radius: 6px; -webkit-border-radius: 6px; -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.6); -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.6); text-shadow: 0 -1px 1px rgba(0,0,0,0.25); border-bottom: … Continue reading

Posted in web development | Tagged , , | Leave a comment

simple form – HTML Version

simple form code <%= simple_form_for @user do |f| %> <%= f.input :username, :label => ‘Your username please’ %> <%= f.input :password, :hint => ‘No special characters.’ %> <%= f.input :remember_me, :as => :boolean %> <%= f.button :submit %> <% end … Continue reading

Posted in rails, ROR, ruby on rails, web development | Tagged , , | Leave a comment

paypal sandbox error:- This transaction cannot be processed due to an invalid merchant configuration.

Solution:- while creating test merchant account select account type as “Website Payments Pro” instead of “seller” http://www.klairvoyant.in

Posted in rails, ROR, ruby on rails, web development | Tagged , , , , | Leave a comment

Paypal with rails-Using Active merchant

1) gem install activemerchant 2) create two paypal test accounts 1)Business 2) personal copy the following information which will be created while creating business account API Username,API Password and Signature location:- https://developer.paypal.com/ 3) code the following in a ruby file … Continue reading

Posted in rails, ROR, ruby on rails, web development | Tagged , , , | Leave a comment

Forms in rails, different ways

1) Method 1 a) input.html.erb <form action=”/look/at”> <input type=”text” name=’text1′> <input type=”checkbox” name=”checkbox1″> <input type=”radio” name=”radio1″ value=”red”>Red <input type=”radio” name=”radio1″ value=”green”>Green <input type=”radio” name=”radio1″ value=”blue”>Blue <select name=”select1″> <option value=’green’/> Green <option value=’Blue’/> Blue <option value=’Red’/> Red <option value=’Orange’/> Orange </select> … Continue reading

Posted in rails, ROR, ruby on rails, web development | Tagged , , | Leave a comment

Amazon Product Advertising API Interface in Rails

1) In gem file add the following and bundle it. gem ‘amazon_product’ 2) configure the request object in controller a) req = AmazonProduct[‘us’] b)req.configure do |c| c.key    = ‘YOURKEY’ c.secret = ‘YOURSECREAT’ c.tag    = ‘YOURTAG’ end get your key,secret etc…  … Continue reading

Posted in rails, ROR, ruby on rails, web development | Tagged , , | Leave a comment