Tags » Ruby On Rails

More testing

Okay this one, was a tough one:

module Ex25

# This function will break up words for me.
def Ex25.break_words(stuff)
words = stuff.split(‘ ‘)
return words… 569 more words

Functions and Files

input_file = ARGV.first     #the first file name is typed in is input_file

def print_all(f)    #f in this case is a variable but also a file… 702 more words

Rails | Avoiding race conditions while updating particular field in DB

It’s okay to make mistakes when you are up to building simple applications. But for mission critical applications like Banking/Payment Processors, you gotta be very careful and keep listening to seniors and experts in critical matters. 263 more words

Ruby On Rails

Coyping files

as the heading says , It’s possible to copy a whole file with:

from_file, to_file = ARGV     #the file we want to copy and the place to paste it…

574 more words

Ruby the Hard Way: Asking Questions

Time time has come to let users input data into our program.

Using gets.chomp allows us to save a user’s input and lets us assign it to a variable and print it out back to the user like: 672 more words

Dead Simple Facebook Integration With Your ROR App

To integrate Facebook signup and login in your application you need to do the followings.

Add

 <strong>gem 'omniauth-facebook' </strong>

in your Gemfile
Generate a migration to add to needed fields in your user model…

663 more words
Omniauth-facebook

Cron Jobs and Rails

Cron

If you’re reading this article, it’s probably because you’ve heard of cron jobs, cron tasks, or crontab. Cron is a piece of software written for *nix-type operating systems to help with the scheduling of recurring tasks. 1,776 more words

Computing