[Rails] Re: Head First Rails Book

2009-03-12 Thread MaD

[quote]
RailsSpace is an introductory book, so we don't assume any knowledge
of the Ruby programming language or of the Rails framework.
[/quote]

personally i didn't read that book, but judging from the above
statement (taken from the introduction of this book) it should be ok
to get in touch with rails. of course, there are the "standards" like
"agile web development", but why shouldn't you start with this one.
buildung a social network might be a good example (or at least as good
as buildung a webshop) to get your hands dirty.

why don't you just tell us about your experience with that book when
you're done with it?
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Ideas for implementing an UI for set combinations in rails

2009-03-12 Thread vimal

Hi,

  Iam rails newbie. I have to implement a UI design for 3 tables based
on set theory.
  I thought a lot of a lot of ideas in the past few days but nothing
seemed to fulfil my necessity

  Say i have tables a, b and c
  I should be able to do like

  a n b
  a u b
  b - a
  (b - a) n c
  etc

  If any web developers well versed in ui designs out there have some
suggestions of doing it, i would
  appreciate it  :)

Regards,
Vimal Das

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Opening for Ruby on rails developers in Pune, India

2009-03-12 Thread vandana

We currently are looking for bright innovators just like you to join
our dynamic start up team.

So, if you are a master of either Ruby on Rails, and have always
dreamed of working in an energetic, highly skilled and entrepreneurial
team of like minded Internet Junkies, your dream may have just come
true. See www.sapnasolutions.com/jobs for more information.

== About SapnaSolutions ==

SapnaSolutions is a new type of web development company, and amongst
the first of its kind in India: We follow a two tier strategy of
delivering highly engaging and creative client projects on one hand,
and developing innovative, 'Intrapreneurial' Web, Mobile and Social
applications, on the other hand. Nicholas Adams (UK) and Anthony Hsiao
(Germany), the guys behind EnTrip, have joined forces with Yann Le
Gouic (France), of Noredox and formerly at StudiVZ. We are expanding
the existing team behind EnTrip to develop more innovative in-house
and client products, to make a mark for Web-Innovation Made-in-India.
SapnaSolutions - We Dare to Dream!


Please visit www.sapnasolutions.com/jobs for more information about
the application process and our company.


== Application Process ==
We at SapnaSolutions understand that great people are our greatest
assets. All applicants will have to clear personal as well as
technical interviews, demonstrate evidence for independent and
creative work, and of course pass our Team-Suitability-Test: Winning a
round of Tennis on our Nintendo Wii.

--
Human Resources
SapnaSolutions
www.sapnasolutions.com


--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Session Expiry

2009-03-12 Thread senthil raja
many thanks Donald , even i was looking for this

whether the session get cleared  by default or only when the page is idle.


Senthil Raja

On Fri, Mar 13, 2009 at 12:52 AM, Greg Donald  wrote:

>
> On Thu, Mar 12, 2009 at 2:26 AM, NARAYANAN CJ 
> wrote:
> > Helllo there,
> >
> > Can any one help me on this "Session Expiry"
> >
> > I just want to make the session expire when the system goes idle
> >
> > how do i do it
>
>
> CGI::Session.expire_after 2.hours
>
>
> --
> Greg Donald
> http://destiney.com/
>
> >
>

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Head First Rails Book

2009-03-12 Thread swachian

No.

On Mar 13, 11:54 am, Zayd Connor 
wrote:
> I'm going through Rails Space right now, but has anyone heard any good
> things about this book for a rails beginner?
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Head First Rails Book

2009-03-12 Thread Zayd Connor

I'm going through Rails Space right now, but has anyone heard any good
things about this book for a rails beginner?
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Production Logging with Rails 2.2.2

2009-03-12 Thread AD

i can say for sure there is at least with Jruby/Tomcat running Rails.
did this only effect you in production ?

On Wed, Mar 11, 2009 at 11:04 PM, tomrossi7  wrote:
>
> I got my logging to start working by adding the following to the end
> of my environment.rb file:
>
> Rails.logger.auto_flushing =1
>
> I wonder if there is an issue with Rails 2.2.2 flushing the log
> buffer?
>
> Thanks,
> Tom
>
> On Mar 11, 8:37 pm, AD  wrote:
>> Interesting i am having the same issue with Jruby/Tomcat.  Nothing is
>> getting logged to localhost--MM-DD.log files at all after a period
>> of time.
>>
>> Is there no way to set the buffer threshold to force a flush on every log ?
>>
>> Adam
>>
>> On Wed, Mar 11, 2009 at 4:36 PM, tomrossi7  wrote:
>>
>> > Its worth noting that the system logs just fine, it is just my logger
>> > messages that get stuck in the buffer.  If I run Rails.logger.flush
>> > from the console, the messages are written correctly to the production
>> > log.  Weird.
>>
>> > On Mar 11, 4:31 pm, TomRossi7  wrote:
>> >> I'm having an issue with logging when I run my Rails app in production
>> >> mode:
>>
>> >> script/console production
>> >> Loading production environment (Rails 2.2.2)>> Rails.logger
>>
>> >> => #> >> @log=#, @buffer={#=>["My
>> >> logged message\n"]}, @guard=#, @level=0>>> 
>> >> Rails.logger.error("hello!")
>> >> => "hello!\n"
>> >> >> Rails.logger
>>
>> >> => #> >> @log=#, @buffer=
>> >> {#=>["Mylogged message\n", "hello!\n"]},
>> >> @guard=#, @level=0>
>>
>> >> For some reason, messages are not being written to the log when I use
>> >> the logger.error or logger.info methods.  They appear in the
>> >> Rails.logger @buffer?
>>
>> >> Anyone have any ideas?
>>
>> >> Thanks!
>> >> Tom
> >
>

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Does anybody have simple example of Tiny_MCE working?

2009-03-12 Thread Kieran

Hey David,

I maintain a plugin for TinyMCE in Rails. You can find it at:

http://github.com/kete/tiny_mce

It's pretty easy to install and setup. See the README on the link
above.

Should only take 2-3 minutes to install, and doesn't need any complex
yields or special form methods.

Regards
Kieran


On Mar 13, 9:14 am, InventoryTrackers 
wrote:
> I've gotten my hopes up a few times and have gone through the many
> Rails Tiny_MCE tutorials only to bomb out.
> All of these tutorials are significantly different which leads me to
> ask if anyone has a very simple Rails app they might share that
> demonstrates this feature.
>
> Some frustrations I've found are;
>
> 1. They suggest loading many lines of javascript tags and yields in
> the application.html.erb  ..what about the current :yield?
> 2. The instructions for the rake plugin don't seem to work the same
> anymore
> 3. There's no examples of using the form_for approach with
> form.text_area etc.
>
> I am grateful for any help in this endeavor and happy to share my
> results.
> David
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Rails Query within Query

2009-03-12 Thread Simon Macneall

I think something like the following:

book_ids = ids of selected books (as gleened from the controller)
chapter_threes = Chapter.find(:all, :include => :book, :conditions => ['book.id 
in ? and chapter.chapter_number = 3', book_ids])

obviously not tested, but once you fix any syntax errors it should work.

Simon

On Fri, 13 Mar 2009 09:46:14 +0900, Avi Ir  
wrote:

>
>
> Thanks for the response Simon -- I think my example didn't fully capture
> what I am trying to do :)
>
> I want to select from a collection or list of items.  I can't use
> 'books.author like' because there is no criteria that ties them all
> together.
>
> A better example would be:
> User is presented with a list of checkboxes (let's say, book names) in a
> form.  He checks several of these checkboxes.  The form gets submitted
> and returns all of the chapters 3 from the selected books.
>
> For example say the user selects:
>
> Fox in Sock by Dr Seuss
> War and Peace by Leo Tolstoy
> The Godfather by Mario Puzo
>
> The form passes the ids of these selections (let's say, [1000, 1001,
> 1002]) to the controller, which then calls a query on these selected
> plates:
>
> selected_books = params[:selected_books]
> Chapter.find(:all, :include=>:book, :conditions => 'chapter.book_id =
> book.id and book.id in books and chapters.chapter=3' )
>
> Is there a way to do that statement?  "in books" is obviously not a
> valid command...
>
> Thanks!
> A






--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Rails Query within Query

2009-03-12 Thread Avi Ir

Simon Macneall wrote:
> Wouldn't it be something like the following:
> 
> suess_chapter_three = Chapter.find(:all, :include=>:book, :conditions => 
> ['books.auther like "suess" and chapters.chapter = 3'])
> 
> Simon

Thanks for the response Simon -- I think my example didn't fully capture 
what I am trying to do :)

I want to select from a collection or list of items.  I can't use 
'books.author like' because there is no criteria that ties them all 
together.

A better example would be:
User is presented with a list of checkboxes (let's say, book names) in a 
form.  He checks several of these checkboxes.  The form gets submitted 
and returns all of the chapters 3 from the selected books.

For example say the user selects:

Fox in Sock by Dr Seuss
War and Peace by Leo Tolstoy
The Godfather by Mario Puzo

The form passes the ids of these selections (let's say, [1000, 1001, 
1002]) to the controller, which then calls a query on these selected 
plates:

selected_books = params[:selected_books]
Chapter.find(:all, :include=>:book, :conditions => 'chapter.book_id = 
book.id and book.id in books and chapters.chapter=3' )

Is there a way to do that statement?  "in books" is obviously not a 
valid command...

Thanks!
A
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Rails Query within Query

2009-03-12 Thread Simon Macneall

Wouldn't it be something like the following:

suess_chapter_three = Chapter.find(:all, :include=>:book, :conditions => 
['books.auther like "suess" and chapters.chapter = 3'])

Simon

On Fri, 13 Mar 2009 09:24:29 +0900, Avi Ir  
wrote:

>
> Hello,
>
> I am looking for a better way to do the following (my code examples are
> crappy pseudocode):
>
> I have two associated models, Book and Chapter, where book has_many
> chapters.  I want to first select several books, for example,
>
> books_by_dr_seuss = Book.find(:all, :conditions => {:author => "Seuss"
> })
>
> Then, I want to select all the "Chapter 3"'s from this result, i.e.
> Chapter 3 of Cat in the Hat, Chapter 3 of Fox in Socks, etc.
>
> I want to do something like:
>
> chapter_threes = Chapter.find(:all, :include=>[:book], :conditions =>
> {chapter.book in books_by_dr_seuss } )
>
> How would I do this without resorting to something like "select * from
> chapters where chapter.book_id=1 or chapter.book_id=2, etc"?
>
> Thanks for your help.
> A





--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Rails Query within Query

2009-03-12 Thread Avi Ir

Hello,

I am looking for a better way to do the following (my code examples are
crappy pseudocode):

I have two associated models, Book and Chapter, where book has_many
chapters.  I want to first select several books, for example,

books_by_dr_seuss = Book.find(:all, :conditions => {:author => "Seuss"
})

Then, I want to select all the "Chapter 3"'s from this result, i.e.
Chapter 3 of Cat in the Hat, Chapter 3 of Fox in Socks, etc.

I want to do something like:

chapter_threes = Chapter.find(:all, :include=>[:book], :conditions =>
{chapter.book in books_by_dr_seuss } )

How would I do this without resorting to something like "select * from
chapters where chapter.book_id=1 or chapter.book_id=2, etc"?

Thanks for your help.
A
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Error in Mysql Connection

2009-03-12 Thread Trejkaz Xx

Hao Zhao wrote:
> 1.  download older MySQL client library, for example one from 
> InstantRails: 
> http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/libmySQL.dll
> 
> 2.  copy the downloaded file to C:\Ruby\bin (or wherever you installed 
> Ruby)
> 
> 3. restart MySQL server

I did steps 1 and 2 (I don't run the server on localhost so step 3 
appears to be pointless for me.)

I then got an error like: Access Denied: C:/Ruby/bin/.../mysql.so

Turns out when the mysql gem installed, it didn't set mysql.so to be 
executable.  I went into Explorer and manually turned it on, and it 
started to work.  Explorer was showing the read permission but not the 
execute permission.  Goes to show that this flag does take effect in 
Windows after all. :rollseyes:

I'm just documenting this in case someone else finds their way here and 
has the same issue.

TX

-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Help: rails magic fallout

2009-03-12 Thread Brian Hogan

@Simon:

Hey, namespace collisions can be troubling, but I'm confused. You said
you made a method on a non-activerecord model but then you said it
worked once you removed the db definition.

What was the name of your model, and did you define a class method or
an instance method? Did you have other plugins installed?

Before you go too much farther, make a brand new Rails app and
duplicate the behavior there. If you can reproduce it,  then it's
either something with names or something goofy in your code. Can you
write a test that reproduces that behavior?

Also can you tell us more about your production environment? You said
it works in all environments through the console, so now I wonder if
you're running it through apache and trying to enumerate a dir that
the user has no access to on the file system.

Tell us more.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Help: rails magic fallout

2009-03-12 Thread Greg Donald

On Thu, Mar 12, 2009 at 4:28 PM, simon  wrote:
>
> Hi all,
>
> I've just wasted a day fixing an issue that IMO shouldn't be one. I've
> got a workaround, but it smells as there's more, and I would greatly
> appreciate pointers what to watch out for.
>
> The issue: I've got a model, and it had a method 'all_noload'. It's
> homebrew, i.e. doesnt' derive from ActiveRecord::Base. all_noload
> simply enumerated a directory and made model objects of it.
>
> Now in production, it didn't work any more. Instead on an array, I got
> []. But not in development or test, i.e. it worked fine in them. Even
> the precise code of all_noload, in the rails console, worked fine in
> all environments.
>
> The 'fix' is to rename the method. Apparently it is related to
> ActiveRecord initialization,

This makes no sense since you just said your model "doesnt' derive
from ActiveRecord::Base" above.

> So, I suspect some rails magic is applied here with overly optimistic
> assumptions.

If you use Rails you have to deal with it's chosen name spaces.  Why
would you think it'd be any other way?

> So, is there a semi-official list of forbidden names in models or
> something?

You can easily check what's already there before making your own class
or method:

ObjectSpace.const_defined?( 'Foo' )

ActiveRecord::Base.respond_to?( 'all_noload' )



-- 
Greg Donald
http://destiney.com/

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Redmine: 500 Internal Server Error Content-Type: text/html

2009-03-12 Thread Vladimir

All is ok now! I've just restarted mongrel claster & updated ruby &
rubygems.

 And I think, that my hoster need to install a mod_rails.

On 13 мар, 01:31, ericindc  wrote:
> What's in your log files?
>
> On Mar 12, 1:30 pm, Vladimir  wrote:
>
> > Hello!
> > I have a such problem in my redmine app, like "Redmine: 500 Internal
> > Server Error Content-Type: text/html " error, from time to time, and
> > there is no periodicly matches.
>
> > Versions:
> > Rails - 2.2.2
> > Ruby - 1.8.5
>
> > Thx, for you answers.
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Noobie questions about sotware versions

2009-03-12 Thread Frederick Cheung



On Mar 12, 10:08 pm, "simonw...@yahoo.com" 
wrote:
>  ‘If I can do it then it can’t be done …’.
>
> As  Dr. Nick of the Simpsons Sez :
>
> Hi Everybody !
>
> I’m about to start my 1st Ruby on Rails (RoR) development project.
>
> The development platform I’ll be using is a Mac running OSX 10.4
> (i.e. : “Tiger”) & 10.5 (i.e. : “Leopard”).
>
> Before I start this development project I have a few questions about
> version numbers and some related issues :
>
> Specifically :
>
> 1. What is the most recent, stable version of Ruby ?
2.2.2 (although 2.3 isn't far off, currently in release candidate
phase)
> 2. What is the most recent, stable version of Ruby on Rails ?
1.9.1 is the latest stable ruby release. It's brand spanking new
though, so a lot of gems and libraries aren't compatible with it yet
(eg rails 2.2.2). Most people are still using ruby 1.8.6 or 1.8.7 in
production.

> 3. Do the 2 versions work together comfortably or are there
> compatibility issues that I need to be aware of ?
> 4. I’m planning on using MySQl as the back end database. What is the
> best version I should be using bearing in mind the answers to
> questions 1,2 & 3 above ?
I'd pick the latest 5.0.xx version (5.1 is now the GA release but
there's been a bit of a tiff with the guy who created mysql saying
that it wasn't ready yet)

> 5. What Application Server would you recommend I use for this
> project ?

mod_rails probably the easiest to get going.

> 6. What source code editor do you recommend I use ? By the way, I’ve
> been using TextWrangler from Bare Bones Software (version 2.2.1 (186 -
> 20070214) and I’ve been pretty happy with it.

I personally like textmate. Editors are quite a personal thing though,
and if you're happy with textwrangler then stick with it
> 7. And, finally, I haven’t been using an IDE. I find at this stage,
> although I readily concede that they have some tremendous advantages,
> I prefer to use just the source code editor as I need to understand
> the structure of the Rails application and I prefer to work with the
> source code and ancillary files directly. But, what IDE’s do you folks
> (and, of course folkettes, no chauvinist, me) recommend or prefer ?
>

TextMate's enough for me. It may not be free but < €50 for something I
spend many hours on is fine by me (not like the keyboard I type on or
screen I look at are free). I hear other are happy with emacs or vim.

Fred
> Finally, given that the global economy is currently imploding and the
> Amerikan economy is disintegrating, I prefer to use free, open source
> development tools if it is at all possible to do so.
>
> I’d like to thank all of you in advance for your help.
>
> Comme toujours, here is my contact information :
>
> 1. Email        : simonw...@yahoo.com
> 2.   Phone      : 718-777-7731
>
> The easiest times to reach me are in the mornings before 11:00 AM or
> in the evening after about 7:00 PM.
>
>                                                 All the best & talk to you 
> soon … Simon.
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Redmine: 500 Internal Server Error Content-Type: text/html

2009-03-12 Thread ericindc

What's in your log files?

On Mar 12, 1:30 pm, Vladimir  wrote:
> Hello!
> I have a such problem in my redmine app, like "Redmine: 500 Internal
> Server Error Content-Type: text/html " error, from time to time, and
> there is no periodicly matches.
>
> Versions:
> Rails - 2.2.2
> Ruby - 1.8.5
>
> Thx, for you answers.
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: using instance variable within JavaScript function loaded in a partial

2009-03-12 Thread Frederick Cheung



On Mar 12, 9:00 pm, David  wrote:
> Im wondering, how do I go about allowing my javascript function to
> load the updated instance variable that is loaded within a partial?
> To be specific, I have a javascript function call:
> onmousedown="changeTab(this)" for a tab in my layout.  This function
> passes an instance variable with an Ajax.Request like so:
>
> changeTab(tab) {
> new Ajax.Request( '/test/ajax', {parameters: { date: <%=
> array_or_string_for_javascript(@date) %> })
>
> }
This code is only evaluated once so what happens is normal. One way of
doing things is to have the date be a parameter of changeTab (assuming
that whatever calls changeTab is updated after these requests).
Another is to have your requests update some global javascript
variable

Fred
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Is there a way to have link_to_remote execute two actions?

2009-03-12 Thread Frederick Cheung



On Mar 12, 8:41 pm, DPF  wrote:
> I'd like users to click on a link with modifies the current page and
> opens a new external url in a new window.  I've got the link_to_remote
> working fine and the current page is updated.  But how to I open a url
> in a new window?

in a nutshell this is what rjs / rendering javascript is for.

Fred
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Help: rails magic fallout

2009-03-12 Thread simon

Hi all,

I've just wasted a day fixing an issue that IMO shouldn't be one. I've
got a workaround, but it smells as there's more, and I would greatly
appreciate pointers what to watch out for.

The issue: I've got a model, and it had a method 'all_noload'. It's
homebrew, i.e. doesnt' derive from ActiveRecord::Base. all_noload
simply enumerated a directory and made model objects of it.

Now in production, it didn't work any more. Instead on an array, I got
[]. But not in development or test, i.e. it worked fine in them. Even
the precise code of all_noload, in the rails console, worked fine in
all environments.

The 'fix' is to rename the method. Apparently it is related to
ActiveRecord initialization, since production was suddenly fine when I
removed the DB defintion (which of course didn't get me far).

So, I suspect some rails magic is applied here with overly optimistic
assumptions.

So, is there a semi-official list of forbidden names in models or
something?

Cheers,

Simon

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Is there a way to have link_to_remote execute two actions?

2009-03-12 Thread DPF

I'd like users to click on a link with modifies the current page and
opens a new external url in a new window.  I've got the link_to_remote
working fine and the current page is updated.  But how to I open a url
in a new window?

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Redmine: 500 Internal Server Error Content-Type: text/html

2009-03-12 Thread Vladimir

Hello!
I have a such problem in my redmine app, like "Redmine: 500 Internal
Server Error Content-Type: text/html " error, from time to time, and
there is no periodicly matches.

Versions:
Rails - 2.2.2
Ruby - 1.8.5

Thx, for you answers.


--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] 2.3 Release notes

2009-03-12 Thread jerry.vos

Hi all, I just wanted to comment on "5.8 Improved Caching Performance"
in the Rails 2.3 release notes (http://guides.rubyonrails.org/
2_3_release_notes.html).

In my first read through of the notes, I had absolutely no idea what
this was talking about. In seeing: "Rails now keeps a per-request
local cache of requests, cutting down on unnecessary reads and leading
to better site performance." my response was "doesn't Rails' query
caching already do that?

After looking around I stumbled on
http://www.motionstandingstill.com/how-to-reduce-your-memcache-reads/2008-11-14/
which is a blog post by the person referenced below the 5.8 section,
so I now know that originally he wrote a buffer for memcache reads,
preventing multiple hits to the memcache server. So I'd think adding
some comments to this regarding its specificity to either Memcache or
Rails.cache hits would be extremely clarifying.

Idea for rewording:
Rails.cache now keeps a per-request local buffer of reads from the
remote cache stores, cutting down on unnecessary reads to the
underlying cache store and leading to better site performance. While
this work was originally limited to MemCacheStore, it is available to
any remote store than implements the required methods.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Ruby on Rails engineer needed in San Francisco, Ca

2009-03-12 Thread dtessitore

Hello Group,

Below is a great opportunity for a Ruby on Rails engineer in the San
Francisco area.

If you're interested please let me know.

Thanks,
Darren Tessitore
dar...@heynow.com



Ruby on Rails Engineer: HTML Version - http://heynow.com/jobs/09031102.html

Posted: 11-March-09
Location:   San Francisco, CA
Salary: Market
Tax term:   Permanent Full-Time Employee
Benefits:   Yes
Position ID:09031102
Contact:Darren Tessitore - dar...@heynow.com

Job Summary:

Our client is looking for a Rudy on Rails engineer to work full-time
in San Francisco near Pier 39. They are a startup with a great
opportunity. They are looking for talented people who can build
products that scale. They have tons of projects to get you fired up in
both games and utility applications.
They are the startup company that created a popular iPhone game and
who are deeply committed to the mobile revolution. They feel that they
are poised for start-up success based upon the coming-of-age of the
iPhone and the advent of Android with 3rd party software applications
for the mobile device.

Their products are testaments to this conviction as they strive to
make a users phone more useful, more beautiful, and more fun.  They
make stuff that people love, whether it is just for fun or extremely
useful, we don't quit until their users are fully satisfied.

Responsibilities/Qualifications:

- 1-3 years experience with Ruby on Rails (front and back-end12
months experience minimum.
- 3-5 years experience in software development
- 3-5 years experience with web UI (DHTML, CSS and Javascript/AJAX)
- Experience with working on a live product with knowledge of the
entire web stack from database to the actual site
- Thorough knowledge of MySQL, Memcached and computer systems in
general
- Have worked or is highly interested in working in a small startup
team.
- Must love the workload of a startup (60-70 hour weeks)
- Have an eye for UI design
- Experience or interest in game design highly preferred
- iPhone SDK experience not required but highly preferred
- Google or startup experience a big plus!
- If candidate is light on experience, graduation from tier-1 tech
school is required!

Apply for this opportunity NOW!

Please send a cover letter, resume and 3 references with contact info
to: dar...@heynow.com

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Noobie questions about sotware versions

2009-03-12 Thread simonw...@yahoo.com

 ‘If I can do it then it can’t be done …’.

As  Dr. Nick of the Simpsons Sez :

Hi Everybody !

I’m about to start my 1st Ruby on Rails (RoR) development project.

The development platform I’ll be using is a Mac running OSX 10.4
(i.e. : “Tiger”) & 10.5 (i.e. : “Leopard”).

Before I start this development project I have a few questions about
version numbers and some related issues :

Specifically :

1. What is the most recent, stable version of Ruby ?
2. What is the most recent, stable version of Ruby on Rails ?
3. Do the 2 versions work together comfortably or are there
compatibility issues that I need to be aware of ?
4. I’m planning on using MySQl as the back end database. What is the
best version I should be using bearing in mind the answers to
questions 1,2 & 3 above ?
5. What Application Server would you recommend I use for this
project ?
6. What source code editor do you recommend I use ? By the way, I’ve
been using TextWrangler from Bare Bones Software (version 2.2.1 (186 -
20070214) and I’ve been pretty happy with it.
7. And, finally, I haven’t been using an IDE. I find at this stage,
although I readily concede that they have some tremendous advantages,
I prefer to use just the source code editor as I need to understand
the structure of the Rails application and I prefer to work with the
source code and ancillary files directly. But, what IDE’s do you folks
(and, of course folkettes, no chauvinist, me) recommend or prefer ?

Finally, given that the global economy is currently imploding and the
Amerikan economy is disintegrating, I prefer to use free, open source
development tools if it is at all possible to do so.

I’d like to thank all of you in advance for your help.

Comme toujours, here is my contact information :

1. Email: simonw...@yahoo.com
2.   Phone  : 718-777-7731

The easiest times to reach me are in the mornings before 11:00 AM or
in the evening after about 7:00 PM.

All the best & talk to you soon 
… Simon.


--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Can RoR do this? How easily?

2009-03-12 Thread Matt Jones

There's already been several solid replies to this, but I'll add that
there are some other possibilities.

For a browserless Ruby solution, you could take a look at Shoes:
http://shoooes.net/ (yes, three o's...)

Or, try a more integrated user interface with XUL and Rails (see
Google for more; the best example I've seen is currently offline [Zed
Shaw's CookbooXUL])

Or, what about a richer client-side Javascript implementation? There
are several promising frameworks currently in development:

SproutCore: http://www.sproutcore.com/ (Apple is using this for
Mobile.Me - management may like that)
Cappuccino: http://cappuccino.org/ (reimplements Cocoa-style APIs in
Javascript)
(and others...)

You didn't describe what the app was doing with the database, but I'll
throw in a mention of CouchDB; if you're synchronizing the client-side
databases at any point, it could be useful.
http://couchdb.apache.org/docs/overview.html

--Matt Jones


On Mar 4, 6:46 pm, Zonker  wrote:

> Is there a way to do this with a RoR solution?
>
> Note: This web-based app would only be run locally, not as a general
> website available to all.
>

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Segment error loading rails

2009-03-12 Thread Chris Cann

I have downloaded ruby 1.9.1 binaries to c:\ruby191 (I have ruby 1.8.6
under c:\ruby). I then downloaded gems 1.3.1 and ran "gem install rails
--include-dependencies" from c:\ruby191\bin and it ran and came up with
a segment error and killed the rails install.

Any ideas what I am doing wrong?

Thanks

Chris
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: scaling full text indexing(ferret vs solr vs hyperstraier)

2009-03-12 Thread Peter Vandenabeele

On Sun, Mar 8, 2009 at 1:14 PM, Marcelo Barbudas  wrote:
> Does any have experience scaling full text search in RoR?

One option that worked very well for me is ultrasphinx.

  http://blog.evanweaver.com/files/doc/fauna/ultrasphinx/files/README.html

IIRC, 2 limitations of ultrasphinx are:

* new entries can only be found after reindexing
  (full reindexing or delta indexing)
* you need a separate sphinx process somewhere on a server
  (if you run a shared hosting system, this may be an issue)

If you can live with those 2 limitations, ultrasphinx is a very good candidate.

HTH,

Peter

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Is Mongrel dead?

2009-03-12 Thread s.ross

On Mar 12, 2009, at 11:41 AM, Gene Gene wrote:

> Rob Biedenharn wrote:
>
>> Perhaps it is just good enough for most. Just because it isn't
>> changing much doesn't mean that it is dead.
> To me it does. I bet performance can be improved, a nice UI to manage
> Mongrels and view logs can be added, etc. There is a reason Apache did
> not stop at 1.2. If it did, we won't be using it now. Things do get
> outdated and constant improvement is necessary.

Oh, you think apache's updated UI is better?

sudo apachectl graceful

That's something mongrel should strive to achieve? It's hard to ignore
the user-friendly Apache log viewer. Pardon the sarcasm, but sometimes
the simpler the solution, the better. Thin is (to me) a slicker mongrel
that is getting some attention. If there is a problem with mongrel, it's
that some might have negative feelings about Zed's rant and connect that
with mongrel (Zed's creation).

Rack has made servers much easier to create and there are a number of
them available right now. I agree that Thin is a good drop-in  
replacement
for mongrel. My limited tests show it consuming a bit less memory and
serving requests a bit faster.

>> Just because a company wants to pay for supported software doesn't
>> mean they understand the value of that software (or of OSS in  
>> general).
>
> Agreed. However, the fact of life is that companies consist of  
> soldiers,
> leutenants, colonels, generals, and politicians :) soldier might know
> from experience that Rails/Mongrels is fine and his leutenant might
> agree. However, when it gets to the general's level he won't know and
> won't care - supplies to his troops must be guaranteed by a big corp
> (IBM, MSoft, HP, Sun, ...). This way politician can say something that
> sounds good to his constituents (shareholders).

Shareholders don't care so long as the company's stock is trading  
higher.

"Generals" who will only buy from IBM, MSFT, etc., *as you describe  
them*
are unlikely to accept the terms of dealing with Rails. That said, there
are a number of large corporations with Web sites hosted on OSS. Apache
remains the leading deployment platform despite a lack of any "official"
support from the vendor. It's not IIS, but that's a GOOD THING. If your
"general" won't accept a solution built on an open source platform, that
is a good thing to know up front so you don't chase your tail. But it
really has more to do with the general than with mongrel.


> EngineYard is a good
> company, but it's no HP/Oracle/Some_other_heavy_weight_corp. In order
> for the Rails to be used at the highest corp level, there need to be
> backing from another big corp. There is a reason folks use Java  
> and .Net
> to develop "ENTERPRIZE" level soft.

Yeah, playing not to lose.

> I see how Sun is trying to get into
> the game with NetBeans and Glassfish capable of running JRuby/Rails.
> However, the effort seems to be just in case, kind of like MSoft's  
> Iron
> Ruby. What I would LOVE to see is for HP or Oracle to step in and  
> offer
> competition to MS/.Net and Sun/Java.

They have an honest intellectual curiosity about dynamic languages,
Ruby, and Rails. They also don't want to help create a situation where
their platform becomes less relevant.

> I mean really back it up with a
> whole stack - app server, training, consulting, etc. It won't kill the
> little guys (there are plenty of Java consulting inc.'s besides the  
> big
> 3), but it will get Rails to corp level for real.

Ah. So we're back to the RMM issue. If you don't have a license,
don't practice software development. That's a religious issue and if
you feel better with "certified" trained developers, then buy into the
proprietary stack. Again, you are less likely to be looking at a Rails
solution because there is no single owner of a closed technology, and
thus no accredited certifying authority that has natural credibility.

The MSFT certification program had mixed results. Naturally, because
it was a barrier to entry, some talented developers became MCSEs. But
some equally smart developers didn't. They were lost to any potential
employer who used certification as a screening tool. Worse, it was
possible to train for the certification exam, making the that a less
valuable assurance of proficiency, as the developers who adopted this
strategy were not necessarily the best and brightest.

This doesn't have anything to do with mongrel either.

Unasked-for advice: Before you hire a developer read his or her code.
Have them explain their decisions. Then trust them. If you can't sell
this upstairs, you've given up one of the strengths of OSS: The fact  
that
you can read the code all the way down to the kernel if need be. And
that is the best assurance of quality I can think of.

/RANT

--~--~-~--~~~---~--~~
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@googlegrou

[Rails] using instance variable within JavaScript function loaded in a partial

2009-03-12 Thread David

Im wondering, how do I go about allowing my javascript function to
load the updated instance variable that is loaded within a partial?
To be specific, I have a javascript function call:
onmousedown="changeTab(this)" for a tab in my layout.  This function
passes an instance variable with an Ajax.Request like so:

changeTab(tab) {
new Ajax.Request( '/test/ajax', {parameters: { date: <%=
array_or_string_for_javascript(@date) %> })
}

@date is changed each time a different link_to_remote is called and
the link_to_remote catches this change and send the updated @date
variable, but my javascript function changeTab does not pass the
updated @date variable.  How do I get the changeTab javascript
function to pass the new updated @date variable?
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Complex forms + DHH's auto_complete plugin = works!

2009-03-12 Thread alyoshka

Hmm, maybe we could some parts together. I like the one in the second
link, but looking at the code, I think there's more extra in there. I
would still need to check it out more thoroughly.

One thing I would like to do is extend the autocomplete functionality
to autocomplete for a whole object.

eg: If you have an Address model which contains street, city, region,
zip. In a form you start typing the street and the autocomplete popup
comes up with the full address. When you choose the address, it
automatically fills in all the fields for the address. Has anybody
done that yet and is it possible to do it easily with Prototype?

On Feb 5, 8:34 pm, Pat  wrote:
> Hi... I wrote some similar code, and packaged it up into a plugin.
> See:http://patshaughnessy.net/repeated_auto_complete
>
> I also know there are a few other forks of the auto_complete plugin
> that also solve this same problem, for 
> example:http://warrenseen.com/blog/2009/01/16/rails-auto-complete-with-form_f...
>
> Or just look through the auto_complete forks on 
> github:http://github.com/rails/auto_complete/network/members
>
> Hope this helps, - pat
>
> On Jan 9, 9:23 pm, alyoshka  wrote:
>
>
>
> > Ooh, that code isn't too readable. Um, I posted it on my website as
> > well:http://detyabozhye.com/
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Which is the best way to do this? (about save time data)

2009-03-12 Thread Charles Johnson
On Thu, Mar 12, 2009 at 2:39 PM, John Smith <
rails-mailing-l...@andreas-s.net> wrote:

>
> I want to save the time that is needed to complete a task I would like
> to save hours and minutes, after filling a form. So I need a select tag,
> but I am not able to use select_time the way way I want. By default, it
> gives me the present time, and I would like to have two selects that
> begin with '00'.
> After filling the gap, shoud I save this like a timestamp?
>
> So I would like to know what is the best to use in the form and how to
> save it. I'll appreciate any help.

Have you looked at select_hour and select_minute, specifically
select_hour(0) and select_minute(0)?

How it gets depends on what data you need. Do you know the date the task was
started? Do you need to know the date the task was completed? Do you just
need to know that for task "A" it was worked on for 3 hours and 10 minutes
(say)?

Cheers--

Charles

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Beginner: what to do after adding an association in a model?

2009-03-12 Thread rroman81

So building on that example,  you should add a column person_id to the
address table.  Rails will infer the foreign key based on rails model
names.  U can also specify the actual column by passing  :foreign_key
into belongs_to macro.

Roman

On Mar 12, 6:22 am, Ar Chron  wrote:
> The associations you create in a model have to be backed up by the
> appropriate fields in the DB.
>
> For example:
>
> class Person
>   has_many :addresses
>
> class Address
>   belongs_to :person
>
> should be a model representation of the relationship inherent in the
> database (the two really go hand-in-hand).
>
> if:
>
> Table people
>   id:integer
>   first_name:string
>   last_name:string
>
> Table address
>   id:integer
>   person_id:integer
>   line1:string
>   line2:string
>   city:string
>   state:string
>   postal_code:string
>
> has_many :addresses tells Rails that for a given person, it can use that
> person id field to retrieve address records (those whose person_id
> matches the current person id value). Similarly, from an address, Rails
> can get back to the person record by following the person_id on the
> address.
>
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Does anybody have simple example of Tiny_MCE working?

2009-03-12 Thread Starr Horne

> I've gotten my hopes up a few times and have gone through the many
> Rails Tiny_MCE tutorials only to bomb out.
> All of these tutorials are significantly different which leads me to
> ask if anyone has a very simple Rails app they might share that
> demonstrates this feature.


I've used the tinymce rails plugin. You just drop it in to your app, and it 
works like a charm. Unfortunately, I don't have any code I can post, though.

SH

-- 
Starr Horne
My blog: http://starrhorne.com
Check out my Helpdesk RailsKit: http://railskits.com/helpdesk/


--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Partials layouts

2009-03-12 Thread Rob Biedenharn

On Mar 12, 2009, at 3:59 PM, Fresh Mix wrote:
> In partial I have something like this:
>
> <% if @first == 'x' %>
> xxx: <%= @data.xxx %>
> yyy: <%= @data.yyy %>
> <% else %>
> yyy: <%= @data.yyy %>
> xxx: <%= @data.xxx %>
> <% end %>
> zzz: <%= @data.zzz %>
> qqq: <%= @data.qqq %>
>
> Is there any better way to do this?
>
> I don't like, that there are same lines 2 times.
> -- 


Controller says:
   @order = [ 'xxx', 'yyy' ]

View:
<% @order.each do |a| %>
<%= a %>: <%= @data.send(a) %>
<% end %>
zzz: <%= @data.zzz %>
qqq: <%= @data.qqq %>

Or go all the way and:
   @order = ['xxx', 'yyy', 'zzz', 'qqq']

-Rob

Rob Biedenharn  http://agileconsultingllc.com
r...@agileconsultingllc.com



--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Does anybody have simple example of Tiny_MCE working?

2009-03-12 Thread InventoryTrackers

I've gotten my hopes up a few times and have gone through the many
Rails Tiny_MCE tutorials only to bomb out.
All of these tutorials are significantly different which leads me to
ask if anyone has a very simple Rails app they might share that
demonstrates this feature.

Some frustrations I've found are;

1. They suggest loading many lines of javascript tags and yields in
the application.html.erb  ..what about the current :yield?
2. The instructions for the rake plugin don't seem to work the same
anymore
3. There's no examples of using the form_for approach with
form.text_area etc.

I am grateful for any help in this endeavor and happy to share my
results.
David

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Partials layouts

2009-03-12 Thread Fresh Mix


In partial I have something like this:

<% if @first == 'x' %>
xxx: <%= @data.xxx %>
yyy: <%= @data.yyy %>
<% else %>
yyy: <%= @data.yyy %>
xxx: <%= @data.xxx %>
<% end %>
zzz: <%= @data.zzz %>
qqq: <%= @data.qqq %>


Is there any better way to do this?

I don't like, that there are same lines 2 times.
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Which is the best way to do this? (about save time data)

2009-03-12 Thread John Smith

I want to save the time that is needed to complete a task I would like
to save hours and minutes, after filling a form. So I need a select tag,
but I am not able to use select_time the way way I want. By default, it
gives me the present time, and I would like to have two selects that
begin with '00'.
After filling the gap, shoud I save this like a timestamp?

So I would like to know what is the best to use in the form and how to
save it. I'll appreciate any help.
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Rails to C binding of libgio

2009-03-12 Thread mvargo

Sorry, I did not put the whole file in the post.  Those are in the
init module.

static VALUE rbgio_init(VALUE self, VALUE path)
{
  VALUE arr, names;

  rb_iv_set(self, "@path", path);
  arr = rb_ary_new();
  names = rb_ary_new();
  rb_iv_set(self, "@attribute_array", arr);
  rb_iv_set(self, "@name_array", names);
  return self;
}

Thanks for looking.  I'm starting to suspect I have to do something to
initialize the library.  I have a call to gdk_init(argc, argv) in the
module initialization, but maybe there is something more?  Maybe I
can't use the library without creating a window?  Not sure.

Mike
On Mar 12, 8:06 am, Jason Roelofs  wrote:
> I see gets but no sets on those ivars you're trying to manipulate. I
> wouldn't assume that you're editing the values in-place instead of a
> copy of what the ivars contained unless you've proven that's what
> you've got (I think that sentence makes sense ...).
>
> Given that you're saying the code doesn't work, try adding the
> following 3 lines to the end of the method:
>
> rb_iv_set(self, "@attributes_array", arr);
> rb_iv_set(self, "@name_array", names);
> rb_iv_set(self, "@path", path);
>
> Jason
>
> On Thu, Mar 12, 2009 at 10:58 AM, mvargo  wrote:
>
> > I'm trying to use some functions from the Gnome GIO library to get
> > extended file attributes.  I'm doing this by writing a C extension
> > using the wonderful directions 
> > inhttp://www.rubycentral.com/pickaxe/ext_ruby.html.
> > All that being said, I don't really know Gnome or GTK+ at all, but I
> > thought my little code would be OK.
>
> > So I have the library built (rubygio.so) and the code all executes
> > fine.  Problem is the gio api calls don't return any info when I think
> > they should.  I'm guessing there is some initialization stuff I'm
> > missing or maybe I have to have a window going or something.  Any help
> > would be appreciated.
>
> > The C code to get the attributes looks like this:
>
> > static VALUE rbgio_load_attributes(VALUE self)
> > {
> >  VALUE arr = rb_iv_get(self, "@attribute_array");
> >  VALUE names = rb_iv_get(self, "@name_array");
> >  VALUE path = rb_iv_get(self, "@path");
>
> >  GFile *ptr = g_file_new_for_path(STR2CSTR(path));
> >  GError *gerror = NULL;
> >  GFileInfo *finfo = g_file_query_info(ptr, "*", 0, NULL, &gerror);
> >  if (finfo == NULL) {
> >    return INT2NUM(0);
> >  }
> >  char **attributes = g_file_info_list_attributes(finfo, "*");
> >  int i = 0;
> >  while (attributes[i] != NULL) {
> >    rb_ary_push(names, rb_str_new2(attributes[i]));
> >    rb_ary_push(arr, rb_str_new2(g_file_info_get_attribute_as_string
> > (finfo, attributes[i])));
> >    i++;
> >  }
> >  return INT2NUM(1)
> > }
>
> > Again it all runs (i've run it in gdb and examined variables).  The
> > GFile *ptr is a real address, the GFileInfo *finfo is a real thing and
> > the char** attributes is a valid list with no entries.
>
> > Any clues would be greatly appreciated.  I will put the extension out
> > there once completed.
>
> > Mike
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Session Expiry

2009-03-12 Thread Greg Donald

On Thu, Mar 12, 2009 at 2:26 AM, NARAYANAN CJ  wrote:
> Helllo there,
>
> Can any one help me on this "Session Expiry"
>
> I just want to make the session expire when the system goes idle
>
> how do i do it


CGI::Session.expire_after 2.hours


-- 
Greg Donald
http://destiney.com/

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: What's the latest on WYSIWYG editor integration with Rails?

2009-03-12 Thread Brian Hogan

That's for markdown, not HTML, and it's not "what you see is what you
get". It's just a nice toolbar. neat though. I may use this on
something else. Thanks for sharing!

On Thu, Mar 12, 2009 at 1:56 PM, Lee Smith
 wrote:
>
> Livepipe has a textarea control built on top of prototype...looks very
> configurable and easy on the eyes.
>
> http://livepipe.net/control/textarea
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Polymorphic Nested Attributes In 2.3

2009-03-12 Thread Lee Smith

If MyClass belongs to your :owner model, wouldn't the :owner model be 
the one that accepts nested attributes for MyClass?
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: What's the latest on WYSIWYG editor integration with Rails?

2009-03-12 Thread Lee Smith

Livepipe has a textarea control built on top of prototype...looks very 
configurable and easy on the eyes.

http://livepipe.net/control/textarea
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Simple search form with restful routes?

2009-03-12 Thread Jl Smith

After updating my tickets resources in my routing config like Andrew 
suggested, does anyone know how I might pass the :id param to the show 
method from the new search method so I don't have to re-write the code 
in the show method?  All I want to do is reuse the show method...it's 
doing exactly what I want my search method to do.  Thanks for any help!
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Is Mongrel dead?

2009-03-12 Thread Gene Gene

Rob Biedenharn wrote:

>Perhaps it is just good enough for most. Just because it isn't
>changing much doesn't mean that it is dead.
To me it does. I bet performance can be improved, a nice UI to manage 
Mongrels and view logs can be added, etc. There is a reason Apache did 
not stop at 1.2. If it did, we won't be using it now. Things do get 
outdated and constant improvement is necessary.

> Just because a company wants to pay for supported software doesn't
> mean they understand the value of that software (or of OSS in general).

Agreed. However, the fact of life is that companies consist of soldiers, 
leutenants, colonels, generals, and politicians :) soldier might know 
from experience that Rails/Mongrels is fine and his leutenant might 
agree. However, when it gets to the general's level he won't know and 
won't care - supplies to his troops must be guaranteed by a big corp 
(IBM, MSoft, HP, Sun, ...). This way politician can say something that 
sounds good to his constituents (shareholders). EngineYard is a good 
company, but it's no HP/Oracle/Some_other_heavy_weight_corp. In order 
for the Rails to be used at the highest corp level, there need to be 
backing from another big corp. There is a reason folks use Java and .Net 
to develop "ENTERPRIZE" level soft. I see how Sun is trying to get into 
the game with NetBeans and Glassfish capable of running JRuby/Rails. 
However, the effort seems to be just in case, kind of like MSoft's Iron 
Ruby. What I would LOVE to see is for HP or Oracle to step in and offer 
competition to MS/.Net and Sun/Java. I mean really back it up with a 
whole stack - app server, training, consulting, etc. It won't kill the 
little guys (there are plenty of Java consulting inc.'s besides the big 
3), but it will get Rails to corp level for real.
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Compare changes.

2009-03-12 Thread ruby...@ymail.com



On 12 Mar., 18:13, Fresh Mix  wrote:
> How can compare, is there any changes in new @edit and what is in
> database?
> Have user chnged any data or pressed just submit without changes?

Try this in the #update action. It's untested:

@edited_data = Data.new(params[:data])
@original_data = Data.find(params[:id])
if @edited_data == @original_data
  # The data is NOT changed...
else
  # The data IS changed...
end

I don't know if the == operator works in this case, but try it out and
come back if you get problems. :)

--
Cheers,
David Knorr
http://twitter.com/rubyguy
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: to_param vs to_query

2009-03-12 Thread Andrew Chalkley

to_param returns the id by default (this is used in the
url /:controller/:action/:id) whereas to_query takes an argument (the
parameter key) object_instance.to_query "o" returns the "o=:id" for
using at the end of urls - custom/'non-restful' actions but
referencing that object.


On Mar 12, 5:19 pm, Miguel Regedor  wrote:
> to_param and to_query, what's the difference between those methods?
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: to_param vs to_query

2009-03-12 Thread ruby...@ymail.com



On 12 Mar., 19:25, "ruby...@ymail.com"  wrote:
> On 12 Mar., 18:19, Miguel Regedor  wrote:

> #to_param is used after the question mark in a URI, #to_query after.
> Hope it makes things clear. :)

No, I meant: "#to_param is used BEFORE the question mark in a URI,
#to_query after." Like this: hello/great/world?words%5B%5D=hello&words
%5B%5D=great&words%5B%5D=world

--
Cheers,
David Knorr
http://twitter.com/rubyguy
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Is Mongrel dead?

2009-03-12 Thread Freddy Andersen

Have a look at thin

http://code.macournoyer.com/thin/

It is easier to install and it uses the Mongrel engine as the core. I
think this is where people that used to use Mongrel moved too.
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: to_param vs to_query

2009-03-12 Thread ruby...@ymail.com

On 12 Mar., 18:19, Miguel Regedor  wrote:
> to_param and to_query, what's the difference between those methods?

If you are refering to the Array class which has been extended with
the two methods #to_param and #to_query, I can tell you that #to_param
calls #to_param calls on all its contained elements and joins them
with a slash. In contrast #to_query calls #to_query on all contained
elements, prefixes them with the first argument ('key') plus [] and
joins it all with an ampersand.

['hello', 'great', 'world'].to_param # => hello/great/world
['hello', 'great', 'world'].to_query('words') # => words%5B
%5D=hello&words%5B%5D=great&words%5B%5D=world

#to_param is used after the question mark in a URI, #to_query after.
Hope it makes things clear. :)

--
Cheers,
David Knorr
http://twitter.com/rubyguy
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Is Mongrel dead?

2009-03-12 Thread Rob Biedenharn

On Mar 12, 2009, at 1:19 PM, Gene Gene wrote:
> Is Mongrel dead? When I look at http://mongrel.rubyforge.org/wiki/News
> the latest news was from close to a year ago, when last version of
> Mongrel was released. A look at the tickets shows a rather sad picture
> with only two developers “evanweaver” and “luislavena” contributing to
> the bug fixes lately.

Perhaps it is just good enough for most. Just because it isn't  
changing much doesn't mean that it is dead.

>
>
> Please understand that I am not complaining – I just want to know the
> situation so that I can make intelligent decision on the long term
> viability of Mongrel as an application server. I realize that it is a
> community project  and if more people (including myself) would put in
> more effort things would be different. However, as it stands now, I am
> not able to contribute due to the lack of knowledge and time. This  
> is a
> normal case of an open source software and, as I said, I am not
> complaining. Still, I would like to understand the long term
> implications of using Mongrel.

EngineYard is still using mongrel and I have a client paying for  
slices that are using mongrel so it isn't like there's no backing for  
it.

>
>
> I know there is Phusion aka mod_rails. However, as it stands right  
> now,
> the company is not a truly “for profit” company and relies on  
> donations
> and consulting in installing mod_rails. Amount of dollars coming in  
> for
> installation consulting is probably questionable since installation is
> fairly simple. The folks behind mod_rails hit the nail on the head
> however, when they introduced “Passenger Enterprise License”.  Folks
> responsible for strategic long term decisions regarding technology  
> need
> to be sure that the company won’t be left high and dry when Mogrel
> drowns (just look at that picture on http://mongrel.rubyforge.org/ 
> wiki -
> poor Fluffy is drowining). Rails proved to be a viable framework, that
> survived time test (although I would certainly prefer to see less
> frequent version releases). However, I am puzzled by the lack of
> interest in offering a commercial app server for Rails. There is
> certainly room for such a thing. Folks like me would rather pay XYZ
> dollars for a license, get phone support, etc. as oppose to  get free
> Mongrel and keep my fingers crossed that new Ruby patch does not break
> it to pieces like it did last year. I know that there is a number of
> companies that use Rails regardless. However, the number would be  
> bigger
> if there were more commercial tools, especially servers. If you look
> into Java world you will see that there is a reason why Weblogic
> successfully competes with free JBoss, Tomcat, and Glassfish.
>
> …but I digress… So is Mongrel dead? Is there a commercial app server  
> for
> Rails?
>
> TPM

I'm sure that if some held up a briefcase full of cash and asked if  
anyone was willing to exchange for some mongrel patches, you'd get  
some takers.  Just make sure the amount of cash is reasonable given  
the kind of patch you expect to receive. ;-)

>
>
> P.S. am intentionally posting this in the Rails forum as oppose to
> Mongrel forum or Deployment form, because I would like to hear from a
> wider audience and also let the wider audience see this thread. I  
> think
> it is very important to the Rails community as it grows and as Rails
> tries to be on the par with Java and .Net in large corporations. Some
> indication where Ruby / Rails are can be gleaned from here:
> http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
> -- 


Just because a company wants to pay for supported software doesn't  
mean they understand the value of that software (or of OSS in general).

-Rob

Rob Biedenharn  http://agileconsultingllc.com
r...@agileconsultingllc.com



--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] normalized table query not working now

2009-03-12 Thread Me

I have a Card table that previously had all of the data in it.  I made
a quite few tables and pulled the duplicated data into their own
table.
I was doing this:
@cards = Card.find_all_by_node_id(@node.id, :conditions =>
["HwDescription like ? OR HwDescription like ?","%OC%","%DS-1%"])

Now that is broken as the data is in a hwdescriptions table.

Any idea how to do this same query with a one-one relationship?
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] to_param vs to_query

2009-03-12 Thread Miguel Regedor

to_param and to_query, what's the difference between those methods?
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Is Mongrel dead?

2009-03-12 Thread Gene Gene

Is Mongrel dead? When I look at http://mongrel.rubyforge.org/wiki/News
the latest news was from close to a year ago, when last version of
Mongrel was released. A look at the tickets shows a rather sad picture
with only two developers “evanweaver” and “luislavena” contributing to
the bug fixes lately.

Please understand that I am not complaining – I just want to know the
situation so that I can make intelligent decision on the long term
viability of Mongrel as an application server. I realize that it is a
community project  and if more people (including myself) would put in
more effort things would be different. However, as it stands now, I am
not able to contribute due to the lack of knowledge and time. This is a
normal case of an open source software and, as I said, I am not
complaining. Still, I would like to understand the long term
implications of using Mongrel.

I know there is Phusion aka mod_rails. However, as it stands right now,
the company is not a truly “for profit” company and relies on donations
and consulting in installing mod_rails. Amount of dollars coming in for
installation consulting is probably questionable since installation is
fairly simple. The folks behind mod_rails hit the nail on the head
however, when they introduced “Passenger Enterprise License”.  Folks
responsible for strategic long term decisions regarding technology need
to be sure that the company won’t be left high and dry when Mogrel
drowns (just look at that picture on http://mongrel.rubyforge.org/wiki -
poor Fluffy is drowining). Rails proved to be a viable framework, that
survived time test (although I would certainly prefer to see less
frequent version releases). However, I am puzzled by the lack of
interest in offering a commercial app server for Rails. There is
certainly room for such a thing. Folks like me would rather pay XYZ
dollars for a license, get phone support, etc. as oppose to  get free
Mongrel and keep my fingers crossed that new Ruby patch does not break
it to pieces like it did last year. I know that there is a number of
companies that use Rails regardless. However, the number would be bigger
if there were more commercial tools, especially servers. If you look
into Java world you will see that there is a reason why Weblogic
successfully competes with free JBoss, Tomcat, and Glassfish.

…but I digress… So is Mongrel dead? Is there a commercial app server for
Rails?

TPM

P.S. am intentionally posting this in the Rails forum as oppose to
Mongrel forum or Deployment form, because I would like to hear from a
wider audience and also let the wider audience see this thread. I think
it is very important to the Rails community as it grows and as Rails
tries to be on the par with Java and .Net in large corporations. Some
indication where Ruby / Rails are can be gleaned from here:
http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How can I append a text_field_tag to a form_for?

2009-03-12 Thread Heinz Strunk

Yeah, that was it. Thanks :)
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Compare changes.

2009-03-12 Thread Fresh Mix

How can I compare an entry?

@edit = Data.find(4)

After this, user update some data en press submit.

How can compare, is there any changes in new @edit and what is in
database?
Have user chnged any data or pressed just submit without changes?
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: will_paginate problem

2009-03-12 Thread Rob Biedenharn


On Mar 12, 2009, at 4:54 AM, engamocap wrote:
> I searched in Internet (http://wiki.github.com/mislav/will_paginate/
> simple-search and http://railscasts.com/episodes/51), but I can't
> solve my problem about pagination. The first page is ok, but when I
> click the “Next page” or any other page link, I lose the FIELD1,
> FIELD2, FIELD3 parameter(s). Can you help me? Thank you very much.
>
> class Model < ActiveRecord::Base
>
>  ...
>
>  def self.display(cond, par, page)
>paginate :all,
> :include => [:table1, :table2],
> :conditions => [cond, par].flatten,
> :page => page,
> :per_page => 10
>  end
>
> end
> 
> class ModelController < ApplicationController
>
>  def start
>...
>  end
>  ...
>
>  def view
>condition = "1=1"
>param = []
>(condition+=" AND models.FIELD1=?"; param << params
> [:FIELD1].values) if params[:FIELD1]
>(condition+=" AND models.FIELD2=?"; param << params
> [:FIELD2].values) if params[:FIELD2]
>(condition+=" AND models.FIELD3=?"; param << params
> [:FIELD3].values) if params[:FIELD3]
>@items = Model.display(condition, param, params[:page])
>  end
>
> end
> 
> view.html.erb
>
>  ...
> <%= will_paginate @items %>
> 
> start.html.erb
>  ...
>  <% form_tag(:action => "view", :method => "get") do %>
>... # define FIELD1, FIELD2 and FIELD3
>  <% end %>


<%= will_paginate @items, :params => params %>

or a suitable subset of the items from params

:params => params.reject {|k,v| k !~ /FIELD/ }

-Rob

Rob Biedenharn  http://agileconsultingllc.com
r...@agileconsultingllc.com
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] How to reuse named scope conditions with eager loading

2009-03-12 Thread szimek

Hi,

I've got Channel model that has many events. Event belongs to channel
and additionally has a named scope called "current".

I need to iterate over each channel and then over each "current" event
for given channel i.e.:

@channels.each do |channel|
  channel.events.current do |event|
...
  end
end

I could do

@channels = Channel.all(:include => :events, :conditions =>
"events.end_time >...")

but the problem is that the conditions would be exactly the same as
already specified for the "current" scope in Event model. Is it
somehow possible to reuse them here?
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How can I append a text_field_tag to a form_for?

2009-03-12 Thread Ar Chron

Disabled items don't come back in the params, perhaps you need a hidden 
field?

I just tweaked the first name field on a person edit form to be 
disabled, and the value did not come back in the params.
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Cleaning Action Cache not working for show action

2009-03-12 Thread jawosis

Hi,

I realized (in development environment with caching activated) that
cleaning the action cache for the show action is not working
properly.
The caching itself works fine - but once I try to clean the cache via
the corresponding sweeper, the show action fragment does not get
swept.

Here is the relevant sweeper method:
def clear_clientcontact_cache(clientcontact)
expire_action(:controller => 'clientcontacts', :action =>
'show', :id => clientcontact.id)
  end

Here is the relevant logfile output:
[Cached fragment hit: views/localhost:3000/clientcontacts/show/1]
#this is the cached fragment
Expired fragment: views/localhost:3000/clientcontacts/1 (0.0ms)


The problem seems to be that the expired fragment does not coincidence
with the fragment the show action looks for: "views/localhost:3000/
clientcontacts/show/1" (--> "show" appears in the path) meanwhile the
expired fragment has no "show" in the path.


Anyone knows why that happens and how I can resolve it?

Thanks for your help!

jochen




--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Setting P3P header before Set-Cookie

2009-03-12 Thread Antoine Antoine


> I tried to add
> response.headers['P3P'] = 'CP="CAO PSA OUR"'
> in a before_filter action in application.rb, but nothing changed.
> 
> Thanks a lot.

Actually, these lines are working fine with IE7. But I have the same 
issue on Safari (Mac and PC).
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How can I append a text_field_tag to a form_for?

2009-03-12 Thread Heinz Strunk

I have it exactly like you said:
<%= text_field_tag "type[#{cat.name}]", 0, :size => 1, :id => 
"type_#{cat.id}", :disabled => true %>
or rather:


But I only get the fields used with the form_for (all form.text_field 
inputs). None of the text_field_tags is in the params array.
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How can I append a text_field_tag to a form_for?

2009-03-12 Thread Tom Ha

You probably just have a typo in your code...


If you include a

   <%= text_field_tag 'firstname' %>

in your form, then you can get the value in the controller using

   params[:firstname]


If you use nested resources, a

   <%= text_field_tag 'user[firstname]' %>

in your form, will result in

   params[:user][:firstname]

in your controller.

Regards,
Tom
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Setting P3P header before Set-Cookie

2009-03-12 Thread Antoine Antoine

Mike Lee wrote:
> Hi folks,
> 
> For a project I'm working on, I need to set an HTTP header BEFORE the
> Set-Cookie header is sent.  Basically, I need to send along our compact
> privacy policy before the cookie is set.
> 
> I've tried using:
> 
> @headers['P3P'] = "P3P: blah blah blah..."
> 
> ...but the problem is that no matter what I do, the Set-Cookie header is
> sent first, and the P3P header is sent afterwards.  I also tried setting
> the "Set-Cookie" header directly in @headers instead of using the
> cookie[] method, and changing the order in which the @headers were set.
> But rails always seems to want to send the "Set-Cookie" header first.
> 
> I'm thinking I might need to override some rails class, but I don't have
> a clue as to where in rails to even begin looking.
> 
> Any ideas on how I can get the P3P header sent first instead?
> 
> Thanks in advance for any help.
> 
> Mike

Hi mike, I think I have exactly the same issue. How did you manage to 
solve this problem ? A strange thing is that I can reproduce this 
problem with safari mac and I never saw someone mentionning while 
browsing the web about this case.

I tried to add
response.headers['P3P'] = 'CP="CAO PSA OUR"'
in a before_filter action in application.rb, but nothing changed.

Thanks a lot.
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How to do queries for 'nested :partial' structures ?

2009-03-12 Thread Tom Ha

Really cool! Thanks a lot, Rob!
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Cookie not written in production environment

2009-03-12 Thread Daniel Liebig

Hi there,

Rails 2.2.2 on Debian Server.

i'm setting a cookie like

cookies[:tg_usn] = {
  :value => @user.username,
  :expires => 5.day.from_now,
}

This work's fine in development environment, but when i start mongrel
with production environment (same server, same network), no cookie is
set by the application.

Any ideas what's happening here?


thanx a lot for any help,

regards
D.
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How to read a charecters from and image?

2009-03-12 Thread cobranet

There is GNU OCR project  ... you can make ruby binding...

On Mar 12, 12:11 pm, Fernando Perez 
wrote:
> senthil raja wrote:
> > Hi
> > I think you want to read captcha image
> > If thats your requirement
>
> I think he actually wants to crack a captcha, by reading the letters
> inside the given image.
> --
> Posted viahttp://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Ruby-ansisys

2009-03-12 Thread Christian Gonzales Komiya
How install Rubyansisys? in Windows XP

Thanks,

-- 
Saludos Cordiales,

Christian David Gonzales Komiya
  Analista-Programador

Cel :  992800307
Blog: http://4cuatros.blogspot.com

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] How can I append a text_field_tag to a form_for?

2009-03-12 Thread Heinz Strunk

Hello people,

how can I append a text_field_tag to a form_for? When I submit the form
all text_field_tags are not being appended to the params...
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Rails to C binding of libgio

2009-03-12 Thread Jason Roelofs

I see gets but no sets on those ivars you're trying to manipulate. I
wouldn't assume that you're editing the values in-place instead of a
copy of what the ivars contained unless you've proven that's what
you've got (I think that sentence makes sense ...).

Given that you're saying the code doesn't work, try adding the
following 3 lines to the end of the method:

rb_iv_set(self, "@attributes_array", arr);
rb_iv_set(self, "@name_array", names);
rb_iv_set(self, "@path", path);

Jason

On Thu, Mar 12, 2009 at 10:58 AM, mvargo  wrote:
>
> I'm trying to use some functions from the Gnome GIO library to get
> extended file attributes.  I'm doing this by writing a C extension
> using the wonderful directions in 
> http://www.rubycentral.com/pickaxe/ext_ruby.html.
> All that being said, I don't really know Gnome or GTK+ at all, but I
> thought my little code would be OK.
>
> So I have the library built (rubygio.so) and the code all executes
> fine.  Problem is the gio api calls don't return any info when I think
> they should.  I'm guessing there is some initialization stuff I'm
> missing or maybe I have to have a window going or something.  Any help
> would be appreciated.
>
> The C code to get the attributes looks like this:
>
> static VALUE rbgio_load_attributes(VALUE self)
> {
>  VALUE arr = rb_iv_get(self, "@attribute_array");
>  VALUE names = rb_iv_get(self, "@name_array");
>  VALUE path = rb_iv_get(self, "@path");
>
>  GFile *ptr = g_file_new_for_path(STR2CSTR(path));
>  GError *gerror = NULL;
>  GFileInfo *finfo = g_file_query_info(ptr, "*", 0, NULL, &gerror);
>  if (finfo == NULL) {
>    return INT2NUM(0);
>  }
>  char **attributes = g_file_info_list_attributes(finfo, "*");
>  int i = 0;
>  while (attributes[i] != NULL) {
>    rb_ary_push(names, rb_str_new2(attributes[i]));
>    rb_ary_push(arr, rb_str_new2(g_file_info_get_attribute_as_string
> (finfo, attributes[i])));
>    i++;
>  }
>  return INT2NUM(1)
> }
>
> Again it all runs (i've run it in gdb and examined variables).  The
> GFile *ptr is a real address, the GFileInfo *finfo is a real thing and
> the char** attributes is a valid list with no entries.
>
> Any clues would be greatly appreciated.  I will put the extension out
> there once completed.
>
> Mike
> >
>

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] How database connection works?

2009-03-12 Thread Rémi Gagnon

Hi all,

Is there documentation on how the database connection works in rails.
When its released? When its reused?  How many time it is kept alive?
That kind of stuff?

Thank you

Rémi
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How many people are using Ruby now?

2009-03-12 Thread Paul_Klipp

I hate capchas, personally. We chose this one because at least it does
some good. As you use it, it improves the OCR of a book scanning
project. But as it's really a barrier to access, then I would prefer a
logical capcha to prevent bots creating accounts. A logical captcha is
something like "The sum of 4 and 8 is ." They are always easy
to read, even for browser readers for the blind.

All the best,

Paul



On Mar 12, 12:51 pm, Colin Law  wrote:
> 2009/3/12 David Nitzsche-Bell 
>
>
>
> > What problem did you have? I had no problem at all.
>
> I could not read the words. I tried the audio feed but that did not
> recognise what I typed either.  The last letter is often truncated.  (Tried
> on IE and FF, no difference).  Once I realised that there was a button to
> generate a new code it was ok, I pressed it a couple of times till something
> I could read appeared.  It would be easier if the words were simple words, I
> have just had another look and one of them is Trubenback, clicked the
> refresh and one is volen with half a letter on the end that might be a t, or
> perhaps it is violent with the i mixed up with the v.
>
> I am not normally deficient in the pattern recognition department as far as
> I am aware.
>
> Colin
>
>
>
> > On Mar 12, 2009, at 12.22 , rails and rails only wrote:
>
> > > Paul_Klipp wrote:
> > >> I enjoyed the Linux Counter (http://counter.li.org/) in the early
> > >> days
> > >> of Linux adoption and so when we had some free time, one of my team
> > >> tossed together a little app for registering and counting Ruby users
> > >> and tracking Ruby adoption rates.
>
> > >> It's athttp://www.rubyusers.com
>
> > > sign up is big problem with CAPTCHAs
> > > --
> > > Posted viahttp://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: "uninitialized constant Gem::Etc (NameError)" when starting server

2009-03-12 Thread Jonathan Wallace

Your version of ruby may be too old.  See
http://rubyforge.org/tracker/index.php?func=detail&aid=22313&group_id=126&atid=575

On Feb 3, 7:56 pm, jslicari  wrote:
> I keep getting this when I try to start the server:
>
> [Macintosh:rails/work/demo] jslicari% script/server
> /Library/Ruby/Site/1.8/rubygems.rb:723:in `set_paths': uninitialized
> constant Gem::Etc (NameError)
>         from /Library/Ruby/Site/1.8/rubygems.rb:719:in `each'
>         from /Library/Ruby/Site/1.8/rubygems.rb:719:in `set_paths'
>         from /Library/Ruby/Site/1.8/rubygems.rb:526:in `path'
>         from /Library/Ruby/Site/1.8/rubygems/source_index.rb:66:in
> `installed_spec_directories'
>         from /Library/Ruby/Site/1.8/rubygems/source_index.rb:56:in
> `from_installed_gems'
>         from /Library/Ruby/Site/1.8/rubygems.rb:736:in `source_index'
>         from /Library/Ruby/Site/1.8/rubygems.rb:140:in `activate'
>         from /Library/Ruby/Site/1.8/rubygems.rb:49:in `gem'
>         from ./script/../config/boot.rb:59:in `load_rails_gem'
>         from ./script/../config/boot.rb:53:in `load_initializer'
>         from ./script/../config/boot.rb:38:in `run'
>         from ./script/../config/boot.rb:11:in `boot!'
>         from ./script/../config/boot.rb:109
>         from script/server:2:in `require'
>         from script/server:2
>
> I have made sure everything is up to date with "sudo gem update" and
> "sudo gem update --system"
>
> Here are the versions I have:
>
> [Macintosh:rails/work/demo] jslicari% gem -v
> 1.3.1
> [Macintosh:rails/work/demo] jslicari% ruby -v
> ruby 1.8.1 (2003-12-25) [powerpc-darwin]
> [Macintosh:rails/work/demo] jslicari% rails -v
> Rails 2.2.2
>
> Thanks
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How many people are using Ruby now?

2009-03-12 Thread Paul_Klipp

So it seems we have to do two things ASAP: replace the Google books
capcha with a logical capcha (I just like the idea of helping with the
Google books project) and relax the email validation. The developer
probably did use a standard regex email validation script from the
web, but often those are not as friendly as those of us with unusual
email addresses would like (mine is @llp.pl, so I get busted from time
to time for not having a .com or .org email).

I'm sure we'll get it fixed soon. The developer was not in the office
today.

Thanks for the community-based testing. :)

All the best,

Paul

On Mar 12, 3:30 pm, Charles Johnson  wrote:
> On Thu, Mar 12, 2009 at 12:30 AM, Paul_Klipp  wrote:
>
> > I enjoyed the Linux Counter (http://counter.li.org/) in the early days
> > of Linux adoption and so when we had some free time, one of my team
> > tossed together a little app for registering and counting Ruby users
> > and tracking Ruby adoption rates.
>
> > Unfortunately, it won't take a valid email address. Mine is a
>
> firstname.initial.lastn...@vanderbilt.edu
> Need to work on the e-mail regex! There are numerous examples on the web for
> e-mail regexes. Have a look.
>
> Oh, and post when it is fixed. Thanks!
>
> Cheers--
>
> Charles
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Rails to C binding of libgio

2009-03-12 Thread mvargo

I'm trying to use some functions from the Gnome GIO library to get
extended file attributes.  I'm doing this by writing a C extension
using the wonderful directions in 
http://www.rubycentral.com/pickaxe/ext_ruby.html.
All that being said, I don't really know Gnome or GTK+ at all, but I
thought my little code would be OK.

So I have the library built (rubygio.so) and the code all executes
fine.  Problem is the gio api calls don't return any info when I think
they should.  I'm guessing there is some initialization stuff I'm
missing or maybe I have to have a window going or something.  Any help
would be appreciated.

The C code to get the attributes looks like this:

static VALUE rbgio_load_attributes(VALUE self)
{
  VALUE arr = rb_iv_get(self, "@attribute_array");
  VALUE names = rb_iv_get(self, "@name_array");
  VALUE path = rb_iv_get(self, "@path");

  GFile *ptr = g_file_new_for_path(STR2CSTR(path));
  GError *gerror = NULL;
  GFileInfo *finfo = g_file_query_info(ptr, "*", 0, NULL, &gerror);
  if (finfo == NULL) {
return INT2NUM(0);
  }
  char **attributes = g_file_info_list_attributes(finfo, "*");
  int i = 0;
  while (attributes[i] != NULL) {
rb_ary_push(names, rb_str_new2(attributes[i]));
rb_ary_push(arr, rb_str_new2(g_file_info_get_attribute_as_string
(finfo, attributes[i])));
i++;
  }
  return INT2NUM(1)
}

Again it all runs (i've run it in gdb and examined variables).  The
GFile *ptr is a real address, the GFileInfo *finfo is a real thing and
the char** attributes is a valid list with no entries.

Any clues would be greatly appreciated.  I will put the extension out
there once completed.

Mike
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: XHTML compliance makes development faster, not slower!

2009-03-12 Thread Phlip

Jason Roelofs wrote:

> http://www.codinghorror.com/blog/archives/001234.html
> 
> Frankly, you're wrong, and XKCD is right. XHTML has some pretty ...
> backwards ideas compared to the "standard" HTML that most developers
> right.

Transitional XHTML??


--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Change will paginate into ajax call

2009-03-12 Thread Geekyra

Hi all,
can i change will paginate system into ajax system ? do i need to
change will paginate core functionality to make it ?
thanks
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How many people are using Ruby now?

2009-03-12 Thread Charles Johnson
On Thu, Mar 12, 2009 at 12:30 AM, Paul_Klipp  wrote:

>
> I enjoyed the Linux Counter (http://counter.li.org/) in the early days
> of Linux adoption and so when we had some free time, one of my team
> tossed together a little app for registering and counting Ruby users
> and tracking Ruby adoption rates.
>
> Unfortunately, it won't take a valid email address. Mine is a
firstname.initial.lastn...@vanderbilt.edu
Need to work on the e-mail regex! There are numerous examples on the web for
e-mail regexes. Have a look.

Oh, and post when it is fixed. Thanks!

Cheers--

Charles

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Lin_to_remote and update a text area

2009-03-12 Thread Sudhi Kulkarni

Hi,

I have a text area with id:"text_area" and in a link_to_remote tag I
want to add content into the text area

I tried (Syntax was correct though not the exact one as below)

link_to_remote (update: "text_area",
   url : { action => "update_text"},
   position: bottom
   )

The update_text action in the controller had

render :text => "This is new line"

THis does not work for text area, any help in the aspect would be good.
If I have a div instead of text area it works but not for the text_area
only.

Thanks,
Sudhindra
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Modify select_year()

2009-03-12 Thread northband_101

Thanks - I should have caught that.

Best,
NB

On Mar 12, 5:02 am, rob-twf  wrote:
> If you're running Rails 2.3 then select_year accepts the :prompt
> option, so...
>
> select_year(date, :prompt => 'Select a year')
>
> ...would work. If you're on an older version of Rails, you'll need to
> do some DIY :)
>
> On Mar 11, 5:02 pm, northband  wrote:
>
> > Hi -
>
> > Does anyone know how to add a selection to this helper:
> > --
> > select_year(date, options = {}, html_options = {})
> > --
>
> > I would like to precede it with 'Select a year' just as I would if I
> > were using .unshift.
>
> > Right now the control is fully populated from start to end year.
>
> > Any ideas appreciated - figured best to ask before having to write a
> > custom helper.
>
> > Thanks!
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Remove trailing zeros

2009-03-12 Thread northband_101

Thanks Matt - I'll try this out.

Best,
NB

On Feb 27, 4:33 pm, Matt Jones  wrote:
> The %g specifier to sprintf will do this automatically:
>
> "%g" % 1.0
> => "1"
>
> "%g" % 1.375
> => "1.375"
>
> --Matt Jones
>
> On Feb 27, 1:20 am, northband  wrote:
>
> > Hi -
>
> > I am working with floats and am wondering how I can trim the decimal
> > and trailing zeros on my whole numbers.  For instance, whole numbers
> > are being displayed as 1.0, 2.0, 3.0, etc...  I would like to remove
> > the decimal and any trailing zeros with out effecting other non-whole
> > number floats (ex. 1.375).
>
> > Any ideas?  Help appreciated.
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Ruby on Btrieve, it's possible?

2009-03-12 Thread Anyel Black

Phlip wrote:
> Anyel Black wrote:
>> Hi guys! Sorry, but i don't write very good in english, anyway, let's
>> go.
>> 
>> I work in a company that uses a ERP software with Btrieve Database, can
>> i (it's possible) building a webapplication to access this data on
>> btrieve? Only queries and reports.
>> 
>> PS: I never worked with Ruby, just ASP and .Net.
> 
> Google only gives 10 hits for [ruby btrieve]...
> 
> This might work:
> 
>   - oledb (odbc) -> dao -> ruby
> 
> Or you might shell to a command line program that reads Btrieve and 
> writes a
> tab-delimited text file format, then read that and use it.
> 
> --
>Phlip


I'll try. If I have problems, I will ask for help in forum, again.

Thanku, Phlip.
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Monkey Patching a Plugin

2009-03-12 Thread zaed

Perfect! Thank you all :)

On Mar 11, 11:45 pm, Ranjeet Jones 
wrote:
> Don't monkey patch a monkey patch.
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Beginner: what to do after adding an association in a model?

2009-03-12 Thread Ar Chron

The associations you create in a model have to be backed up by the 
appropriate fields in the DB.

For example:

class Person
  has_many :addresses

class Address
  belongs_to :person

should be a model representation of the relationship inherent in the 
database (the two really go hand-in-hand).

if:

Table people
  id:integer
  first_name:string
  last_name:string

Table address
  id:integer
  person_id:integer
  line1:string
  line2:string
  city:string
  state:string
  postal_code:string

has_many :addresses tells Rails that for a given person, it can use that 
person id field to retrieve address records (those whose person_id 
matches the current person id value). Similarly, from an address, Rails 
can get back to the person record by following the person_id on the 
address.

-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Generating routes on demand

2009-03-12 Thread Drogomir

Hi,

I have problem with routes. It's the big one (over 50 resources) and
starting an app is a pain - 3-4 seconds. I've added :only and :except
options where I could and it's better than at the beginning but
still... slow.

I use passenger to deploy apps, so fast boot is important. I thought
that most of the routes are not used often anyway (especially those
from admin/) and in most cases while instance is running (and while
passenger stops app after 5 minute idle time) most of the routes are
not used... Generation on demand would fix this problem.

For example: I call user_path(@user) and it doesn't exist so it's
generated and is available with next requests.

Is this doable? Or maybe there is some plugin which makes the trick?
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: will_paginate problem

2009-03-12 Thread Priya Buvan

I think you are not getting my question.. I asked whether FIELD1, 
FIELD2,FIELD3 are table column headings? Like

Eg:

S.No Name RollNo Address
  1   xx   xxx 

S.No Name RollNo Address are column heading. Need to show this in all 
pages?
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: XHTML compliance makes development faster, not slower!

2009-03-12 Thread Jason Roelofs

http://www.codinghorror.com/blog/archives/001234.html

Frankly, you're wrong, and XKCD is right. XHTML has some pretty ...
backwards ideas compared to the "standard" HTML that most developers
right.

Jason

On Thu, Mar 12, 2009 at 8:27 AM, Phlip  wrote:
>
> http://xkcd.org/554/
>
> Someone tell Randall he got part of panel 3 wrong, k? tx!
>
>
> >
>

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: InvalidAuthenticityToken from home page

2009-03-12 Thread Brian Hogan

@seja:

Yeah but that's for the entire app, and it's not a good idea to
disable it for the entire ap.

On Thu, Mar 12, 2009 at 2:35 AM, seja  wrote:
>
> you also can set forgery protection to false
> In rails 2, it is true by default.
>
> Set in environment file
>
> config.action_controller.allow_forgery_protection  = false
>
> On Mar 12, 8:54 am, Paul Reitz 
> wrote:
>> Thanks for the replies. @Brian, that worked - thank you :)
>>
>> --
>> Posted viahttp://www.ruby-forum.com/.
>
> >
>

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: not logged in in subdomain?

2009-03-12 Thread Starr Horne

On Thu, 12 Mar 2009 04:38:15 -0700 (PDT)
phil  wrote:

> 
> For some reason my users get logged out when they switch to a
> subdomain.


You need to specify a wildcard domain for your auth cookie. The default is to 
use the entire domain.

Here's a blog post explaining how:

http://szeryf.wordpress.com/2008/01/21/cookie-handling-in-multi-domain-applications-in-ruby-on-rails/#

SH

-- 
Starr Horne
My blog: http://starrhorne.com
Check out my Helpdesk RailsKit: http://railskits.com/helpdesk/


--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] XHTML compliance makes development faster, not slower!

2009-03-12 Thread Phlip

http://xkcd.org/554/

Someone tell Randall he got part of panel 3 wrong, k? tx!


--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How many people are using Ruby now?

2009-03-12 Thread David Nitzsche-Bell

I guess I just lucked out. I tried again several times and I see what  
you mean. In some cases the last letter was indeed truncated.

Well, I hope this gets addressed.

David


--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How many people are using Ruby now?

2009-03-12 Thread Colin Law
2009/3/12 David Nitzsche-Bell 

>
> What problem did you have? I had no problem at all.


I could not read the words. I tried the audio feed but that did not
recognise what I typed either.  The last letter is often truncated.  (Tried
on IE and FF, no difference).  Once I realised that there was a button to
generate a new code it was ok, I pressed it a couple of times till something
I could read appeared.  It would be easier if the words were simple words, I
have just had another look and one of them is Trubenback, clicked the
refresh and one is volen with half a letter on the end that might be a t, or
perhaps it is violent with the i mixed up with the v.

I am not normally deficient in the pattern recognition department as far as
I am aware.

Colin


>
>
> On Mar 12, 2009, at 12.22 , rails and rails only wrote:
>
> >
> > Paul_Klipp wrote:
> >> I enjoyed the Linux Counter (http://counter.li.org/) in the early
> >> days
> >> of Linux adoption and so when we had some free time, one of my team
> >> tossed together a little app for registering and counting Ruby users
> >> and tracking Ruby adoption rates.
> >>
> >> It's at http://www.rubyusers.com
> >
> >
> > sign up is big problem with CAPTCHAs
> > --
> > Posted via http://www.ruby-forum.com/.
> >
> > >
>
>
> >
>

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Search Function

2009-03-12 Thread Colin Law
Have you worked through the guides at http://guides.rubyonrails.org/?

I can highly recommend the book Agile Development with Rails (
http://www.pragprog.com/titles/rails3/agile-web-development-with-rails-third-edition
)

The railscasts at http://railscasts.com/ are excellent

A bit of googling will reveal numerous other guides and tutorials.  Make
sure any you work through are for rails 2 as otherwise you will get horribly
confused when the tutorials don't work.

Good luck

Colin

2009/3/12 Inderpal Bhogal 

>
> hi colin,
>
> does the join table have to be called categories_stores. when this table
> was created i just called it categoriesstores (without the underscore_).
> does that cause problems.
>
> i have a button that when clicked it should look into stores table and
> match the store with the category it relates to and then takes the user
> to tht particular store page.
>
> i have tried form_for and tag methods but have been useless so far.
> i am quite new to ruby on rails and have been teaching myself for the
> last 3 months. is it possible for you provide sum sort of code that
> could help me.something which i can look at and implement into my
> system.
>
> Many Thanks for replying Colin.
>
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] not logged in in subdomain?

2009-03-12 Thread phil

For some reason my users get logged out when they switch to a
subdomain.
I have this in my environment:

config.action_controller.session = {
  :session_key => '_app_session',
  :session_domain => 'mydomain.com',
  :secret  => ''
}

Which I thought would cover that...

help!
--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How many people are using Ruby now?

2009-03-12 Thread David Nitzsche-Bell

What problem did you have? I had no problem at all.

On Mar 12, 2009, at 12.22 , rails and rails only wrote:

>
> Paul_Klipp wrote:
>> I enjoyed the Linux Counter (http://counter.li.org/) in the early  
>> days
>> of Linux adoption and so when we had some free time, one of my team
>> tossed together a little app for registering and counting Ruby users
>> and tracking Ruby adoption rates.
>>
>> It's at http://www.rubyusers.com
>
>
> sign up is big problem with CAPTCHAs
> -- 
> Posted via http://www.ruby-forum.com/.
>
> >


--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Search Function

2009-03-12 Thread Inderpal Bhogal

hi colin,

does the join table have to be called categories_stores. when this table 
was created i just called it categoriesstores (without the underscore_). 
does that cause problems.

i have a button that when clicked it should look into stores table and 
match the store with the category it relates to and then takes the user 
to tht particular store page.

i have tried form_for and tag methods but have been useless so far.
i am quite new to ruby on rails and have been teaching myself for the 
last 3 months. is it possible for you provide sum sort of code that 
could help me.something which i can look at and implement into my 
system.

Many Thanks for replying Colin.

-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How many people are using Ruby now?

2009-03-12 Thread Colin Law
2009/3/12 rails and rails only 

>
> Paul_Klipp wrote:
> > I enjoyed the Linux Counter (http://counter.li.org/) in the early days
> > of Linux adoption and so when we had some free time, one of my team
> > tossed together a little app for registering and counting Ruby users
> > and tracking Ruby adoption rates.
> >
> > It's at http://www.rubyusers.com
>
>
> sign up is big problem with CAPTCHAs
>

Yes, it took me three gos to get the text correct.

Colin

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How many people are using Ruby now?

2009-03-12 Thread rails and rails only

Paul_Klipp wrote:
> I enjoyed the Linux Counter (http://counter.li.org/) in the early days
> of Linux adoption and so when we had some free time, one of my team
> tossed together a little app for registering and counting Ruby users
> and tracking Ruby adoption rates.
> 
> It's at http://www.rubyusers.com


sign up is big problem with CAPTCHAs
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How to read a charecters from and image?

2009-03-12 Thread Fernando Perez

senthil raja wrote:
> Hi
> I think you want to read captcha image
> If thats your requirement
> 

I think he actually wants to crack a captcha, by reading the letters 
inside the given image.
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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 to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



  1   2   >