[Rails] Re: formats in action view base

2012-09-15 Thread 7stud --
7stud -- wrote in post #1076203: > > Modules that are included are inserted into the inheritance chain. > Where in the chain? > > > > module Cat > def greet > puts 'meow' > end > end > > class Animal > def greet > puts 'hi' > end > end > > class Dog < Animal > include Cat > > de

[Rails] Rails 3.2.6 hates dbi gem ?

2012-09-15 Thread Satish S.
I have a bad problem I have a small rails app .. was running fine with ruby 1.8x and rails 2.x In my extreme stupidity I decided to move to ruby 1.9.x and rails 3 .. and it's a glorious pain. My ruby app uses mysql .. and I use active record for that. However there is an earlier pgm I had writte

[Rails] Re: formats in action view base

2012-09-15 Thread 7stud --
class Animal def greet puts 'hi' end end class Dog < Animal def greet super end end d = Dog.new d.greet --output:-- hi module Animal def greet puts 'hi' end end class Dog include Animal def greet super end end d = Dog.new d.greet --output:-- hi Modul

[Rails] Re: formats in action view base

2012-09-15 Thread John Merlino
Let's say I call LookupContext with a details hash consisitng of a format. Here's the sequence as I understand it: 1) First lookup_context.rb is loaded, which means the macros are called immediately. The register_detail macro, accepts a symbol and block. We pass it a symbol :formats and a block wh

Re: [Rails] Re: New to Ruby

2012-09-15 Thread Victor Goff
http://RubyLearning.com is there for you too. There is a Core Ruby batch starting in about a week as well. Not 'Rails-centric' but Ruby-centric. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyon

[Rails] Re: ruby server chrashes

2012-09-15 Thread roelof
Hello, Doing all the steps again did the step. The only thing I changed is before I made the gemset I entered ruby use 1.9.3 Everythig thanks for the help Roelof Op zaterdag 15 september 2012 12:15:31 UTC+2 schreef Frederick Cheung het volgende: > > On Friday, September 14, 2012 8:23:06 PM

Re: [Rails] Re: New to Ruby

2012-09-15 Thread ANIKET KADAM
thanks very much, i m newbie too On Sat, Sep 15, 2012 at 10:01 PM, fuzzy wrote: > Hello Samir, > > I am a newbie as well, and not even a programmer ... I have built up > this list of potential help. Some are free and others you pay for. > Just check each one out and use there free services until

[Rails] formats in action view base

2012-09-15 Thread John Merlino
When you invoke ActionView::Base, it in turn invokes a LookupContext object. The LookupContext class object has some class level macros that builds some instance methods corresponding to a format: register_detail(:formats) { ActionView::Base.default_formats || [:html, :text, :js, :css, :xm

Re: [Rails] Array value to get except first two values

2012-09-15 Thread Rob Biedenharn
And, of course, you can just you plain 'ol Ruby for this too: a = [1,2,3,4,5] a[2..-1] # => [3,4,5] %w[ a b c d e ][3..-1] #=> ['d', 'e'] -Rob On Sep 15, 2012, at 6:25 AM, Yong Gu wrote: > If you are using Rails, > > %w( a b c d ).from(0) # => %w( a b c d ) > %w( a b c d ).from(2) # => %w(

Re: [Rails] [RSpec Testing] Methods take two arguments

2012-09-15 Thread Mirri Kim
P.S. But still, this will probably fail because you're not actually doing anything (at least that's obvious) to trigger PdfHelper.create_pdf. "user" has no knowledge of "file" assuming you have a callback to create a pdf when a user is created. The first test is also weird, it's like saying a = 1;

Re: [Rails] [RSpec Testing] Methods take two arguments

2012-09-15 Thread Mirri Kim
Hi there, try: PdfHelper.should_recieve(:create_pdf).with(user, file) On Sun, Sep 16, 2012 at 1:01 AM, Adnan wrote: > Hello, > > Here is my *pdf_helper.rb* => http://pastebin.com/QU1kTKXk. I want to > test, if self.create method can take more than two arguments. But, when I > try to run my test

Re: [Rails] ROR books seem to be out of date

2012-09-15 Thread Peter Hickman
You seem to be complaining about the IDEs more than RoR. Give us some details and we might be able to help you. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To uns

Re: [Rails] ROR books seem to be out of date

2012-09-15 Thread Hassan Schroeder
On Sat, Sep 15, 2012 at 8:26 AM, brian brian wrote: /* content-free whinging deleted */ > help No one is going to be able to even confirm your suspicions without your providing actual information. What "texts"? What "examples"? What versions of Rails, gem, etc. are you trying to use? What prob

[Rails] [RSpec Testing] Methods take two arguments

2012-09-15 Thread Adnan
Hello, Here is my *pdf_helper.rb* => http://pastebin.com/QU1kTKXk. I want to test, if self.create method can take more than two arguments. But, when I try to run my test. It showed *PdfHelper Should have two arguments Failure/Error: create_pdf.should_receive(object,template).with(user,fi

Re: [Rails] id NOT IN (?)

2012-09-15 Thread Walter Lee Davis
On Sep 15, 2012, at 2:01 AM, daynthan kabilan wrote: > Hi i have 2 table users and issues > > I need daily report . all users are give a status to everyday. i got it in 2 > line. > But i need leave users also. > If i use 1st def method i got user status list and all users no record > fi

[Rails] ROR books seem to be out of date

2012-09-15 Thread brian brian
i am trying to get started on ROR but the texts all seem to be out of date as regards samples that wont run on later IDEs such as aptana studio ,rubymine and so on.github examples are also out of date and wont run. beginning Rails3 samples appear to also not able to run ,even using github exampl

Re: [Rails] Array value to get except first two values

2012-09-15 Thread Yong Gu
If you are using Rails, %w( a b c d ).from(0) # => %w( a b c d ) %w( a b c d ).from(2) # => %w( c d ) %w( a b c d ).from(10) # => %w() %w().from(0) # => %w() On Sep 15, 2012, at 6:21 PM, Maddy wrote: > Hi folks, > > In an array value i need to find except first two values, > > exa

[Rails] Re: New to Ruby

2012-09-15 Thread fuzzy
Hello Samir, I am a newbie as well, and not even a programmer ... I have built up this list of potential help. Some are free and others you pay for. Just check each one out and use there free services until you get more proficient. I used Michael Hartl' screencasts to learn the basics. Here is th

Re: [Rails] Array value to get except first two values

2012-09-15 Thread Jordon Bedwell
On Sat, Sep 15, 2012 at 9:33 AM, Hassan Schroeder wrote: > On Sat, Sep 15, 2012 at 3:21 AM, Maddy wrote: > >> In an array value i need to find except first two values, >> >> example: >> [1,2,3,4,5,6,7,8 ] >> >> in that i need to get values except [1,2]. >> >> How can i get it from this array?? >>

Re: [Rails] Array value to get except first two values

2012-09-15 Thread Hassan Schroeder
On Sat, Sep 15, 2012 at 3:21 AM, Maddy wrote: > In an array value i need to find except first two values, > > example: > [1,2,3,4,5,6,7,8 ] > > in that i need to get values except [1,2]. > > How can i get it from this array?? > > please advise Advisory #1: READ THE DOCS FOR ARRAY. Advisory

Re: [Rails] How to read Microsoft document file in ruby on rails ?

2012-09-15 Thread Scott Ribe
On Sep 15, 2012, at 7:27 AM, Paul wrote: > The docx format is actually pretty simple... You are really cruel to toy with him like that ;-) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- You received this message because you are subscribed to

Re: [Rails] (JOB) Looking for RoR Engineer

2012-09-15 Thread Panayotis Matsinopoulos
@Gintautas I agree with you that all the details of a job posting should be there from the beginning. But, please, exactly as you say that "this mailing list is not a place to defend claims about Greece being a step from bankrupt" you need to know that *this mailing list is not for you to tell anyb

Re: [Rails] How to read Microsoft document file in ruby on rails ?

2012-09-15 Thread Paul
The docx format is actually pretty simple: it is a zipped set of files. If you upload it to the server and unzip it, you'll see a set of xml files. You can poke around and figure out the format, or you can find a spec on line. On Thu, Sep 13, 2012 at 9:59 AM, Walter Lee Davis wrote: > > On Sep 13

Re: [Rails] Could not find gem 'nileshtrivedi-gupshup (>= 0) ruby' in the gems available on this machine.

2012-09-15 Thread Fabian Becker
The gem is simply called gupshup. Habe a look Art the readme oft the gem: https://github.com/nileshtrivedi/gupshup On Sep 15, 2012 1:42 PM, "Fahim Patel" wrote: > > I wish to use nileshtrivedi-gupshup gem but i am getting this error. > > Can any one know about this? > ERROR > Could not find gem '

Re: [Rails] (JOB) Looking for RoR Engineer

2012-09-15 Thread Gintautas Šimkus
Well if a country requests billions in euros of help, it indicates that they are not 'well' nation wide. I meant that the country of work is important and should be mentioned in a job proposal. That's it. Yeah I must've missed the joke on this one. It looked like a Greek tried to defend the propos

[Rails] Could not find gem 'nileshtrivedi-gupshup (>= 0) ruby' in the gems available on this machine.

2012-09-15 Thread Fahim Patel
I wish to use nileshtrivedi-gupshup gem but i am getting this error. Can any one know about this? ERROR Could not find gem 'nileshtrivedi-gupshup (>= 0) ruby' in the gems available on this machine. Thanks Fahim Babar Patel -- You received this message because you are subscribed to the Googl

Re: [Rails] Array value to get except first two values

2012-09-15 Thread Иван Бишевац
[1,2,3,4,5,6,7,8 ][0..1] Look at documentation http://ruby-doc.org/core-1.9.3/Array.html#method-i-5B-5D. Generally good advice is to bookmark this page. 2012/9/15 Maddy > [1,2,3,4,5,6,7,8 ] -- You received this message because you are subscribed to the Googl

Re: [Rails] (JOB) Looking for RoR Engineer

2012-09-15 Thread Gintautas Šimkus
No problem. I deduce you are Greek. And that you tried to advocate working in Greece is similar to working in DE or US, which is not that case at this point. I mean people should decide by themselves where to work. And working in Greece (or any other country) is OK with me. I was just pointing out

Re: [Rails] (JOB) Looking for RoR Engineer

2012-09-15 Thread Gintautas Šimkus
No problem. I deduce you are Greek. And that you tried to advocate working in Greece is similar to working in DE or US, which is not that case at this point. I mean people should decide by themselves where to work. And working in Greece (or any other country) is OK with me. I was just pointing out

Re: [Rails] (JOB) Looking for RoR Engineer

2012-09-15 Thread Panayotis Matsinopoulos
On Sat, Sep 15, 2012 at 12:39 PM, Gintautas Šimkus wrote: > Not sure if you aware of it or not but Greece has a high chance of going > bankrupt. So that maybe where the concerns come from. Blue sea is nice when > you can live in the country w/o a good chance for your company to be > nationalized,

Re: [Rails] Array value to get except first two values

2012-09-15 Thread Carlos Mathiasen
[1,2,3,4].select{|n| ![1,2].include? n} :-) --- Send from my cellphone -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email t

[Rails] Array value to get except first two values

2012-09-15 Thread Maddy
Hi folks, In an array value i need to find except first two values, example: [1,2,3,4,5,6,7,8 ] in that i need to get values except [1,2]. How can i get it from this array?? please advise -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"

[Rails] Re: ruby server chrashes

2012-09-15 Thread Frederick Cheung
On Friday, September 14, 2012 8:23:06 PM UTC+1, roelof wrote: > > Hello, > > When I do rails server it chrashed with this ouput : > http://pastebin.com/DJ21qC5h > > Anyone a idea what is the cause of this problem and how to solve this ? > > If reinstalling the gems in a clean gemset doesn't wor

Re: [Rails] Lottery Number Matching

2012-09-15 Thread Gintautas Šimkus
Which university? ;) 2012/9/14 Samir > Can any body please help me to solve this? > > Create a lottery app which will take a number as parameter and there will > be a set of number from 0 to n random number every time. > If the given number matches the random array[0] number by the program, > sh

Re: [Rails] (JOB) Looking for RoR Engineer

2012-09-15 Thread Gintautas Šimkus
Not sure if you aware of it or not but Greece has a high chance of going bankrupt. So that maybe where the concerns come from. Blue sea is nice when you can live in the country w/o a good chance for your company to be nationalized, drop in value, or start paying you in some bogus currency which the

Re: [Rails] Re: Devise sign up with paypal

2012-09-15 Thread Gintautas Šimkus
I mean come on! FFS! You want to do something that the gem that provides immense possibilities for you does not do. Just right an extention or whatever. You can't expect the mailing list to do your job. My personal opinion. 2012/9/15 Thomas B. > https://github.com/dwilkie/devise_paypal > > -- >

Re: [Rails] Re: "belongs_to" aliases

2012-09-15 Thread Panayotis Matsinopoulos
You may be right, but I have found a lot of other posts on Internet that they complain about "belongs_to". It does not bear the correct meaning for all cases. For example: class Product belongs_to :status end .Awful. No, the Product does not "belong" to a Status. It "has_a" status. Als

Re: [Rails] (JOB) Looking for RoR Engineer

2012-09-15 Thread Panayotis Matsinopoulos
Peter ... you are absolutely right. BTW1, Greece is very-very-very cheap and has fantastic weather and beautiful sea and beaches. :-) BTW2. I am certain that this job cannot come from a Greek company. Greek companies rarely use Ruby on Rails. Most of them use java technologies and .NET Panayotis

[Rails] Lottery Number Matching

2012-09-15 Thread Samir
Can any body please help me to solve this? Create a lottery app which will take a number as parameter and there will be a set of number from 0 to n random number every time. If the given number matches the random array[0] number by the program, show a message you won the loterry. If the given n

[Rails] New to Ruby

2012-09-15 Thread Samir
Hi Friends. I am extremely new to Ruby. can you please suggest me how to proceed to grab this in a short span of time... -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.c