Sudah dipecahkan. Silahkan lihat di sini:
http://railsforum.com/viewtopic.php?id=35472

Maaf telah membuat thread ini jadi panjang karena masalah dasar seperti ini.
Makasi atas tanggapan2nya.

Dida


2009/11/13 Bobby Adi Prabowo <[email protected]>

>
>
> maksud saya attribut is_current nya itu bentrok sama conditionsnya
> searchlogic nya, coba diganti namanya / dihapus.
>
>
> On Nov 13, 2009, at 1:11 PM, Aditya Agustyana wrote:
>
> > oh Quiz itu hasil intercept ruby-debugger, atau hasil Ruby script/
> > console ?
> >
> > 2009/11/13 Adinda Praditya <[email protected] <apraditya%40gmail.com>>
> >
> >>
> >>
> >> Ada, khan uda kliatan dr sini:
> >>
> >>
> >> #<Quiz id: nil, name: "ano", created_at: nil, updated_at: nil,
> >> is_current:
> >> true>
> >>
> >> makasi informasi tambahannya
> >>
> >> dida
> >>
> >>
> >> On Friday, November 13, 2009, Bobby Adi Prabowo
> >> <[email protected] <tigaenamb%40gmail.com><tigaenamb%40gmail.com>>
> >> wrote:
> >>> ada kolom is_current ga di model Quiz nya, liat di db/schema.rb,
> >>> soalnya klo di searchlogic ga ada kondisi current deh.
> >>>
> >>>> #<Quiz id: nil, name: "ano", created_at: nil, updated_at: nil,
> >>> is_current: true>
> >>>>> cq.save
> >>> NoMethodError: undefined method `is_current_equals' for #<Quiz:
> >>> 0x10339e1b8>
> >>> kalau ga ada nama kolom tersebut ada kemungkinan error gara-gara
> >>> is_current_equals nya bentrok sama searchlogic, dia ngira itu
> >>> dynamic
> >>> method punya nya searchlogic. jadi kalau pake searclogic harus hati-
> >>> hati dalam penamaan attribut/kolom, jangan sama/mengandung dengan
> >>> condition di bawah (untuk comparisson, wildcard, sama boolean) :
> >>>
> >>> COMPARISON_CONDITIONS = { :equals =>
> >>> [:is, :eq], :does_not_equal
> >> =>
> >>> [:not_equal_to, :is_not, :not, :ne], :less_than =>
> >>> [:lt, :before], :less_than_or_equal_to => [:lte], :greater_than =>
> >>> [:gt, :after], :greater_than_or_equal_to => [:gte], }
> >>> WILDCARD_CONDITIONS = { :like => [:contains, :includes],
> >> :not_like =>
> >>> [], :begins_with => [:bw], :not_begin_with =>
> >>> [:does_not_begin_with], :ends_with => [:ew], :not_end_with =>
> >>> [:does_not_end_with]
> >>> BOOLEAN_CONDITIONS = { :null => [:nil], :not_null =>
> >>> [:not_nil], :empty => [], :blank => [], :not_blank => [:present]
> >>> CONDITIONS = {}
> >>> PRIMARY_CONDITIONS = CONDITIONS.keys
> >>> ALIAS_CONDITIONS = CONDITIONS.values.flatten
> >>>
> >>>
> >>> moga2 membantu
> >>>
> >>> visit my blog at http://bobbyprabowo.wordpress.com
> >>>
> >>> On Nov 13, 2009, at 10:22 AM, Adinda Praditya wrote:
> >>>
> >>>> Ternyata pake searchlogic pun nggak menyelesaikan masalah karena
> >>>> akarnya
> >>>> nggak di situ. Ini pastie-nya:
> >>>>
> >>>> http://pastie.org/696747
> >>>>
> >>>> Ada yang bisa kasih saran?
> >>>>
> >>>> Dida
> >>>>
> >>>> 2009/11/13 Adinda Praditya 
> >>>> <[email protected]<apraditya%40gmail.com><apraditya
> >>>> %40gmail.com>
> >>>
> >>>>
> >>>>> Makasih atas solusi alternatif-nya. Kalo nggak salah selain lebih
> >>>> mudah,
> >>>>> searchlogic juga lebih efisien query-nya ya..? Sekarang pas tau
> >>>> find-nya
> >>>>> bermasalah gini, jadi panik juga, uda ditengah jalan gini.
> >>>> Mudah2an gem ini
> >>>>> bisa membantu. Kalo ada yang mo ngecek ada sesuatu di OSX 10.6.2 +
> >>>> ruby
> >>>>> 1.8.7 p174, mohon dishare juga di sini.
> >>>>>
> >>>>> Thanks,
> >>>>> Dida
> >>>>>
> >>>>> 2009/11/13 Bobby Adi Prabowo 
> >>>>> <[email protected]<tigaenamb%40gmail.com><tigaenamb
>
> >>>>> %40gmail.com>
> >>>
> >>>>>
> >>>>>
> >>>>>>
> >>>>>> kalau untuk perintah query buat nyari, saya menyarankan pake gem
> >>>>>> searchlogic, ga ribet, ga perlu pake sequel.
> >>>>>>
> >>>>>> example nya jadi gini
> >>>>>>
> >>>>>> Nation.country_like(params[:ctr_id]).
> >>>>>>
> >>>>>> atau
> >>>>>>
> >>>>>> Product.code_number_equals(params[:ctr_id])
> >>>>>>
> >>>>>> lebih enak.
> >>>>>>
> >>>>>> bisa dilihat di railscast nya, di
> >>>>>> http://railscasts.com/episodes/176-searchlogic
> >>>>>>
> >>>>>>
> >>>>
> >>>> [Non-text portions of this message have been removed]
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>> [Non-text portions of this message have been removed]
> >>>
> >>>
> >>>
> >>> ------------------------------------
> >>>
> >>> ID-Ruby
> >>> Berdiskusi dan belajar bersama Bahasa Pemrograman Ruby, termasuk
> >>> segala
> >> varian Ruby (JRuby, Rubinius, IronRuby, XRuby), dan program yang
> >> dibuat
> >> dengan Ruby (Ruby on Rails, JRuby on Rails, Merb)
> >>>
> >>> http://rubyurl.com/Q8DD
> >>> http://news.gmane.org/gmane.comp.lang.ruby.region.indonesia
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> >
> >
> >
> > --
> > blog : http://adityakircon.blogsome.com
> > ym : kirconboy
> > skype : adit_skype
> >
> > Be Nice. Treat others with the same respect you'd want them to treat
> > you.
> > We're all here to learn together. Be tolerant of others who may not
> > know
> > everything you know. BRING YOUR SENSE OF HUMOR (stackoverflow.com)
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> > ------------------------------------
> >
> > ID-Ruby
> > Berdiskusi dan belajar bersama Bahasa Pemrograman Ruby, termasuk
> > segala varian Ruby (JRuby, Rubinius, IronRuby, XRuby), dan program
> > yang dibuat dengan Ruby (Ruby on Rails, JRuby on Rails, Merb)
> >
> > http://rubyurl.com/Q8DD
> > http://news.gmane.org/gmane.comp.lang.ruby.region.indonesia
> >
> >
> >
> >
>
>  
>


[Non-text portions of this message have been removed]

Kirim email ke