Rashmi Yadav


jQuery attr(‘value’) and val()

Here is a short tip about using $(obj).val() and $(obj).attr(‘value’). I was fixing a bug in ajax request with some params then i found that there is a difference val() method and attr(‘value’) I never faced this problem before. I thought to share this with you guys.

Read on →

Rails 4 Directory Structure

Rails 4 is released. Lots of new features has been added to rails. Here we will see what new directories have been added.

We will create a sample app in rails 4 so that it will be easy to see the new structure. I am assuming you have updated your rails. To check current version of rails run following command:

rails -v

It should be Rails 4.0.0

Read on →

Enhance Rails Models

In Rails Models play a important part in our Rails App.We should keep are model pretty,not having dirty code Here i am just reminding you some basic points to refactor a model.

Read on →

Background Processing Using Rails Runner

Rails comes with a built-in tool for running tasks independent of the web cycle. The rails runner command simply loads the default Rails environment and then executes some specified Ruby code.

Read on →

Rails 3 Responders

So we have a problem here in Controllers. As our application grows our controllers grows. We will be in trouble when we have alternative formats in our controllers like JSON, XML.

Read on →

OAuth with OmniAuth and Github

If you want to authenticate your user in your app with Github  use omniauth-github strategy for that. Here I am describing how you can do that very quickly. OmniAuth provides list of  strategies to use many OAuth for your application. Here is the  List of Strategies.

Read on →