[Rails] error in your SQL syntax

2012-01-08 Thread sachin kewale
hi all, i am getting the following exception ,can anyone know what is the problem ? or can any one what is SQL syntax for following query to run in ruby on rails ? i am using Ruby: 1.8.7 (2011-02-18 patchlevel 334) [i386-mingw32] Rails 2.3.11 gem :1.6.2 Processing ExpertController#view_exper

Re: [Rails] How to Convert Html Entities to Ascii Chararcters

2012-01-08 Thread Christian Bautista
Thank you.. I just found the answer. thanks :) On Mon, Jan 9, 2012 at 11:55 AM, Charles A. Lopez wrote: > Which is greater, the number of html entities or the number of Ascii > Codes? > > > > On 8 January 2012 22:50, Christian Bautista < > christianbautista.i...@gmail.com> wrote: > >> Thanks for

Re: [Rails] How to Convert Html Entities to Ascii Chararcters

2012-01-08 Thread Charles A. Lopez
Which is greater, the number of html entities or the number of Ascii Codes? On 8 January 2012 22:50, Christian Bautista < christianbautista.i...@gmail.com> wrote: > Thanks for your reply > > this is the sample input > > !Hello World '!' > > I want this to be converted to a Ascii so maybe I can

Re: [Rails] How to Convert Html Entities to Ascii Chararcters

2012-01-08 Thread Christian Bautista
Thanks for your reply this is the sample input !Hello World '!' I want this to be converted to a Ascii so maybe I can make a dot matrix printer read the ascii code. What I need is to generate a report to a dot matrix printer.. Hope you can help me.. On Mon, Jan 9, 2012 at 11:38 AM, Charles

Re: [Rails] How to Convert Html Entities to Ascii Chararcters

2012-01-08 Thread Charles A. Lopez
please provide a few examples of input and output. 10q. On 8 January 2012 22:24, Christian Bautista < christianbautista.i...@gmail.com> wrote: > Is there anyone who knows how to do this.. > > I am having a hard time finding it how. > > Any help is appreciated. > thanks in advance > > -- > You re

[Rails] How to Convert Html Entities to Ascii Chararcters

2012-01-08 Thread Christian Bautista
Is there anyone who knows how to do this.. I am having a hard time finding it how. Any help is appreciated. thanks in advance -- 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@googlegr

Re: [Rails] Save Array

2012-01-08 Thread Christian Bautista
Yes I think that is possible.. after saving the array in the database trying playing arround with this codes.. .enum .sym Well, I have a doubt if that will work. But there is nothing to lose if you try it.. On Mon, Jan 9, 2012 at 10:17 AM, Dave Aronson < googlegroups2d...@davearonson.com> wrote

[Rails] Re: including jQuery library

2012-01-08 Thread Soichi Ishida
Thanks everyone. The book is using Rails 3.0.5. And I changed to <%= javascript_include_tag "application"%> then the finally generated page seems to includes the jquery.js as I wished. But it does not fade out...it seems weird. I will check the tutorial page you suggested. Thanks. soichi --

Re: [Rails] Save Array

2012-01-08 Thread Dave Aronson
On Sun, Jan 8, 2012 at 20:38, Paul wrote: > But, if you knew that you'd never want to do any SQL actions > on that array My crystal ball is rather foggy. Must need a good waxing. ;-) > wouldn't it execute faster if you just save it as a string? Possibly... but the big question is, which is w

Re: [Rails] Save Array

2012-01-08 Thread Paul
But, if you knew that you'd never want to do any SQL actions on that array (it was just extra data attached to that record), wouldn't it execute faster if you just save it as a string? And as far as being clean, I'd think that not creating a table you didn't need was pretty clean, too. (I ask, not

[Rails] Re: How to send a ASCII escape sequence to a Dot Matrix Printer

2012-01-08 Thread Christian Bautista
Hello, I dont have any code yet for it. I dont know how to do it because I need first to know how to send ascii to a dot matrix printer. I've tried this typical printing code so far. <%=link_to_function("Print this Page", "javascript:print()") %> On 7 Ene, 23:44, Matt Jones wrote: > On Jan 5, 10

Re: [Rails] Save Array

2012-01-08 Thread Dave Aronson
On Sun, Jan 8, 2012 at 19:02, Rodrigo Ruiz wrote: > Hi, is there a way to save an array of float values to my database (for a > specific mode, for example User, so it stays like user.values = [0, 2, 54, > 3])? There are lots of ways. For instance, if you really want to save it as an array, *and

Re: [Rails] Save Array

2012-01-08 Thread Ahmy Yulrizka
Hmm, one way is to implement it as has_many association. but also you could save it as json or xml. or use serialization http://api.rubyonrails.org/classes/ActiveModel/Serialization.html Ahmy Yulrizka On Mon, Jan 9, 2012 at 7:02 AM, Rodrigo Ruiz wrote: > Hi, is there a way to save an array of

[Rails] Save Array

2012-01-08 Thread Rodrigo Ruiz
Hi, is there a way to save an array of float values to my database (for a specific mode, for example User, so it stays like user.values = [0, 2, 54, 3])? Thanks in advance -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this g

[Rails] Re: Report strategy

2012-01-08 Thread djangst
I gave up on find_by_sql (it wasn't adding the attributes it seemed it should) and am using select_all: @posts = ActiveRecord::Base.connection.select_all(query_method) On Jan 8, 4:16 pm, djangst wrote: > The other problem I have is find_by_sql is only returning a couple of > columns from one tab

[Rails] Re: Report strategy

2012-01-08 Thread djangst
The other problem I have is find_by_sql is only returning a couple of columns from one table, when it's supposed to return many columns from several tables. I can't convert the query to AR because it consists of subqueries within subqueries. On Jan 8, 3:04 pm, djangst wrote: > I need to offer cu

[Rails] Re: One-to-one or one-to-many association

2012-01-08 Thread hangul
>From my understanding, It is more likely one-to-many relationship because, as you already mentioned, one "equipment_type" is referenced by many "equipment". In Rails perspective, they can be associated like this: equipment belongs_to equipment_type equipment_type has_many equipment Hope it would

[Rails] Report strategy

2012-01-08 Thread djangst
I need to offer custom reports but haven't been able to find an existing package to help us. How have other people solved this problem? I read old posts but haven't found anything (Ruports isn't 1.9-compatible, which would bite us later, and enterprisey tools aren't an option). The queries are co

Re: [Rails] Re: Equivalent to observe_field in rails 3

2012-01-08 Thread Bill Walton
On Sun, Jan 8, 2012 at 11:40 AM, venkata reddy wrote: > As i already mentioned above, i am using 3.0.10 here and the default > js library is prototype. But still i am not able make observe_field > working. Missed that. Sorry. In that case I'd need to know more about what 'not working' means. Y

[Rails] Re: Equivalent to observe_field in rails 3

2012-01-08 Thread venkata reddy
As i already mentioned above, i am using 3.0.10 here and the default js library is prototype. But still i am not able make observe_field working. Any ideas? On Jan 8, 8:08 pm, Bill Walton wrote: > Hi Venkata, > > On Sun, Jan 8, 2012 at 1:57 AM, venkata reddy > wrote: > > Hi every one, > >    

Re: [Rails] Equivalent to observe_field in rails 3

2012-01-08 Thread Bill Walton
Hi Venkata, On Sun, Jan 8, 2012 at 1:57 AM, venkata reddy wrote: > Hi every one, >                   i need something like populating all the states > when a particular country selected. My exact requirement is, in my > project management tool, when a project is selected all of its > activities s

[Rails] Re: could not get 3xx (550)

2012-01-08 Thread Matt Jones
On Jan 7, 7:52 am, Dharmdip Rathod wrote: > Getting strange error while performing rake task. > > Automated creating users for testing. > > It's creating users till number 999, getting error while creating user > 1000. > > Rake Task : > > desc "Generate test users" >   task :generate_test_users

Re: [Rails] One-to-one or one-to-many association

2012-01-08 Thread Colin Law
On 7 January 2012 21:12, davidwright66 wrote: > Hi, > > I am creating a stock control application. > I have a table called "equipment_type" that stores a general > description of a piece of equipment. This could be for instance: Canon > 60D DSLR camera. > I also have an table called "equipment" th

Re: [Rails] Advanced has_many and belongs_to model joins ?

2012-01-08 Thread Colin Law
On 8 January 2012 05:04, Jordan Miller wrote: > Hi, > > I'm having major trouble with a somewhat self-referencing has_many and > belongs_to set of models. > > item.manufacturer correctly returns an object of type Vendor. However, > item.manufacturer.name raises an exception even though the name va

Re: [Rails] including jQuery library

2012-01-08 Thread Colin Law
On 8 January 2012 06:02, Soichi Ishida wrote: > Hi. I have started Rails a few days ago. > With the help of a book (written in Japanese), I'm working on a tutorial > program which simply shows how to include jQuery file. > > Rails version 3.1.3 Find a tutorial that matches the version of rails th

[Rails] Rails Dev Needed for Minimal Viable Product

2012-01-08 Thread ruby
Hello all and Happy New Year to you, I posted an inquiry a week ago for a Ruby dev and I'm giving the community another try. I've learned so much just from following the threads. The experience that I have had being part of these conversations is much like the vision I have for the developer

Re: [Rails] Beginner here: What does it take to find a decent job as Rails developer and live from it

2012-01-08 Thread ruby
github.com find people on quora.com and stackoverflow. twitter isn't a bad place to start streaming tags. and i think it's always good to form relationships first then ask for a recommendation 2nd. people still hire people. i have a freelance opt if you're ever interested. On Jan 5, 2012, at

[Rails] Re: Shibboleth

2012-01-08 Thread alex
The problem with rack-saml and similar is that they don't support encrypted responses. I ran into this issue while trying to work with an IdP and encryption enabled (the encryption was a requirement). My stack was nginx (1 server frontend) + passengers (m

[Rails] does ror support unittest on sqlite memory mode ?

2012-01-08 Thread Kula
it can speed up the unittest. but i can't find any support on ror -- 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 ruby

[Rails] One-to-one or one-to-many association

2012-01-08 Thread davidwright66
Hi, I am creating a stock control application. I have a table called "equipment_type" that stores a general description of a piece of equipment. This could be for instance: Canon 60D DSLR camera. I also have an table called "equipment" that stores all the equipment we have with their serial number

[Rails] Advanced has_many and belongs_to model joins ?

2012-01-08 Thread Jordan Miller
Hi, I'm having major trouble with a somewhat self-referencing has_many and belongs_to set of models. item.manufacturer correctly returns an object of type Vendor. However, item.manufacturer.name raises an exception even though the name value is set correctly. I've been debugging and googling and

Re: [Rails] Re: Simple code...please help me in debugging

2012-01-08 Thread Colin Law
On 8 January 2012 06:29, Libber wrote: > @all: > Can you please suggest a good rails tutorial on using forms? railstutorial.org covers most basic features of Rails and is free to use online. Make sure that any tutorial you use is for the version of Rails that you are using. Colin -- You recei