using jQuery-rails and datepicker, timepicker & datetimepicker
jQuery datepicker plugin is used to display inline calendar popup that eases user input experience while entering date/time fields. Calendar can be easily binded to any html DOM element. To Apply...
View ArticleDynamic methods inside ruby classes
Ruby language is dynamic and robust. We can define methods inside ruby classes at runtime. # bash class A define_method :a do puts "hello" end define_method :greeting do |message| puts message end end...
View ArticleBest practices to use named scopes inside models
Scopes are partial query conditions to database queries. scopes are always prefixed to class finders. There are several ways to use scopes inside rails models. # 1. Scope defined below gets loaded...
View Articletwitter bootstrap paginate and rails 3
Twitter bootstrap is css toolkit for rapid front-end UI development.To get will-paginate working with bootstrap css we need to override default pagination link renderer. Using Bootstrap-sass for rails...
View ArticleSimplified Active Record Extensions
Below extensions to active record base simplifies its usage while coding.# config/initializers/core_extensions.rb class ActiveRecord::Base def self.pagination(options) paginate :per_page =>...
View Articleactive-admin sass and rails 3
active_admin is the good way to provide rails administrative interface.It provides front-end db administration and its customizable too :)# Gemfile gem 'activeadmin' gem 'sass-rails' gem "meta_search",...
View ArticleAuthorize Net (AIM) payment integration with rails
Authorize Net (AIM) method enables internet merchants to accept online payments via credit card.Below post will show you how to integrate authorize net payment gateway inside rails app to accept online...
View ArticleBugging around Active Support's Class.class_attribute extension
We all know Active Support library constantly keeps adding new extensions to ruby core library and hence rails framework. Do you know now inside ruby class we can have class_attribute placeholder....
View Articlerailroady UML diagram generator for rails
railroady is UML class diagram generator for rails. First you need to install `graphviz` pkg in order to have `dot` , `neato` commands availablegroup :development, :test do gem railroady end Run below...
View ArticleAuthorize Net Payment Gateway integration with rails
Authorize Net Payment gateway provides api access to enable online payments Gateway provides different api options to integrate- 1. Direct Post Method In this method gateway handles all steps required...
View ArticleCustomizing rails default form builder
Customizing default rails form builder to adopt for labels, input fields, errors, hints, etc. in order to build forms just in minutes # app/helpers/app_form_builder.rb class AppFormBuilder :req) end...
View ArticleAuthorize Net (SIM) payment integration with rails
Authorize Net SIM gateway transaction skips merchant side creditcard details form and directs transaction to be take place on gateway server. # Gemfile gem 'authorize-net' Register for authorize net...
View ArticlePaypal payments integration with rails
Paypal standard website payment service allows online payment transactions for websites. Before implementing payments inside rails app needs to have following things in place- 1. Register Paypal...
View Articleunderstanding rails uri
rails-uri module provide us with url manipulation methodsParse string urlurl = URI.parse('http://funonrails.com/search/label/rails3') url.host #=> "http://funonrails.com" url.port #=> 80 URL with...
View Articlestripe gateway payment integration with rails
Stripe is simple website payment solution and its very easy to easy setupIt currently supports only in US and seems to be very popular compared to other payment gateways because of its api &...
View ArticleGet models list inside rails app
How to get collection of models inside your application. Certainly there are many ways to do it.Lets have a look at different ways starting from worst - Get table names inside database and then...
View Articletwitter-bootstrap form builder for rails
twitter-bootstrap is pluggable css suit provided by twitter. To know more about how to get started on it click hereBelow post will help you out in getting started bootstrap css with rails app. One need...
View Articlemongoid array field and rails form
mongoid document supports array as field. array field in mongoid document is a ruby array but its quite complex to manage array field in rails forms.After lot of google and reading comments from...
View ArticleMongoid embeded_in and Array field management
Previous post explains on mongoid document array field and rails form implementationBelow example shows rails form integration of array field of embedded mongoid document consider scenario, student...
View Articlecsv file import / export in rails 3
CSV (comma separated values) files are frequently used to import/export data. In rails 3, FasterCSV comes as default and below is the way to upload csv files inside rails applications. The code below...
View Article
More Pages to Explore .....