473,404 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

uninitialized constant CouponDuniaData (NameError)

Expand|Select|Wrap|Line Numbers
  1. class Client::CouponDunia
  2. end
  3.  
  4. class CouponDuniaData::Client
  5.     c = Client::CouponDunia.new
  6.     #Define The Empty Array To get the record from Coupon Dunia
  7.     category_arr = []
  8.     category_arr = c.all_categories.last
  9.     @transaction_category = TransactionCategory.new
  10.     #Loop For Categories that Will Come Across From Coupon Dunia
  11.     category_arr.each do |i|
  12.         cat_name = nil
  13.         cat_name = i.to_hash
  14.          @transaction_category = TransactionCategory.new(user_id: 1, active:1, private_category_flag:1, category_name:cat_name["Name"])
  15.         if @transaction_category.save
  16.           puts  "Transaction Category Details are successfully Saved"
  17.           puts cat_name
  18.           #redirect_to @transaction_category
  19.         else
  20.           p  @transaction_category.errors.full_messages.to_sentence
  21.           #render 'new'
  22.         end
  23.     end
  24. end
Nov 25 '15 #1
1 5682
zmbd
5,501 Expert Mod 4TB
and your question is?
Nov 25 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: Lasse Skyum | last post by:
I have my own string class that I'm generally verry fond of compared to std::string. For that same reason I'm trying to improve a little on it. Since manny objects in my project will contain...
2
by: nan.li.g | last post by:
I have this simple code below. When I compiled it, I got the following error. But after I removed the comment marker(//), i.e. explicitly defined a constructor, it becomes OK. The compiler...
5
by: Ney André de Mello Zunino | last post by:
Hello. Based on this simple test program: class Test {}; int main() { Test t; const Test u;
1
by: pillbug | last post by:
Hello, I would like to know what the standard says regarding writing beyond the end of file. For example, in the following program, is the result always the same or is it system dependent? ...
16
by: Gowtham | last post by:
Hi, I had some C code written which initialized a global variable as: FILE *yyerfp = stdout; This used to work fine in older versions of gcc. Now, when I tried to compile this code (with...
4
by: harijay | last post by:
Hi I am new to writing module and object oriented python code. I am trying to understand namespaces and classes in python. I have the following test case given in three files runner , master and...
1
by: Wiinie | last post by:
Hi all, I am new bird using Ruby, I just occur the problem "uninitialized constant Object::Person (NameError)" can any experts help me? my code is class Person def initialize(fname,...
1
by: Wiinie | last post by:
Hi, I am a new comer on Ruby on Rails I have no idea what i have made with this error def new @language = Language.new end
0
by: Magudamudi | last post by:
Hi, I practice some examples but i couldn't run it well hello_message_controller.rb: class HelloMessageController < ApplicationController web_service_api HelloMessageApi ...
0
Exequiel
by: Exequiel | last post by:
This is my controller personnel_core_controller.rb class PersonnelCoreController < ApplicationController before_action :set_personnel, only: def index @personnel = Personnel.all end...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.