[Rails] Re: Confused about REST and custom actions

2009-05-05 Thread John Small
> In your example your mapping is essentially say this: > POST: http://example.com/accounts/authorize > > According to this, sending a POST to authorize should "create" a new > account. That's not, however, what you're really wanting to do. What's > really going on in terms of REST is that you

[Rails] Re: Unable to deactivate forgery protection

2009-05-05 Thread Fernando Perez
> I'm assuming that the above is not a cut-and-paste from the app? > Because "verify" is misspelled. Magnificent catch! I would not have been able to spot it by myself! Thank you Freddy and C.R.O. for your time :) -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~--

[Rails] Re: In lieu of scaffolding...

2009-05-05 Thread Brendon
On May 5, 8:27 am, Marnen Laibow-Koser wrote: > Brendon Whateley wrote: > > ActiveScaffold brings with it a lot of magic.  If you do everything > > and name everything the way it wants, all is good.   > > It does want helper methods named a certain way, but so what? You may have to create cont

[Rails] Re: How to use json in view file

2009-05-05 Thread nirvana
Thank you very much. On May 5, 6:34 pm, nirvana wrote: > => [#, > # , country: "usa", year: "2001", amount: 1564>, # country: "usa", y > ear: "2002", amount: 6463>, # "2003", amount > : 150002>, # 5000>, #  id: 6, country: "usa", year: "2005", amount: 4150>, # country: "u > sa", year: "2006", am

[Rails] link_to_remote with Modalbox.show

2009-05-05 Thread Sijo Kg
Hi In helper I have change_email_link html = [] html << change_email_js(:email => @email) html << %{ edit } html.join end Now def change_email_js(options ={}) %{ popup_email = function() { Modalbox.show('#{ %{
etc.. #{li

[Rails] Re: [ANN] New rails-based site helps you release your anger

2009-05-05 Thread Danny Burkes
> In similar fashion, I built http://reading.welikeprint.com/ in a > couple of hours to test out rails + ajax + twitter integration. The > features are strikingly similar to these two mentioned. Ha, that's cool. What motivated me was just the simple, uncluttered beauty of a page like http://dan

[Rails] Re: Base Auth plugin

2009-05-05 Thread Freddy Andersen
The base-auth plugin is a authentication plugin and has nothing todo with how you access a resource (the users houses). You can use the helper methods to enforce access rights but it still has nothing to-do with user.houses base-auth is a similar plugin to restful-authentication and Authlogic jus

[Rails] OCI Library Initialization Error

2009-05-05 Thread Tristan Gutsche
I am attempting to connect to ORACLE11g however i am getting the following error: "OCI Library Initialization Error" IT always errors on OCIENV.init(). I cant see anything wrong on the ENV configurations. Has anyone had this problem, or any suggestions on where i should look for anwers? I am

[Rails] Re: no sql in the controller guideline

2009-05-05 Thread Phlip
Phlip wrote: >> "Nothing that looks at all like SQL should go into a controller, view, >> or helper." > > Things that "look like" SQL include any kind of query more elaborate than a > simple accessor call. I just read _all_ of Fowler's statement. Helpers are a gray area. In software design, t

[Rails] Re: no sql in the controller guideline

2009-05-05 Thread Phlip
PP Junty wrote: > hello. i just checked Chad Fowler's post "20 Rails Development No-No's" > and > one guideline caught my attention. it says: > > "Nothing that looks at all like SQL should go into a controller, view, > or helper." Things that "look like" SQL include any kind of query more elabo

[Rails] Base Auth plugin

2009-05-05 Thread madankumarrajan
Where do we really need base-auth plugin? If a 'user' has multiple 'houses', most of the RESTful actions can use user.houses itself instead of base-auth. INDEX: user.houses EDIT/UPDATE/DESTROY/SHOW: user.houses.find(params[:id]) NEW: user.houses.build UPDATE: user.houses.create(params[:house]) I

[Rails] Re: [ANN] New rails-based site helps you release your anger

2009-05-05 Thread Kevin Elliott
In similar fashion, I built http://reading.welikeprint.com/ in a couple of hours to test out rails + ajax + twitter integration. The features are strikingly similar to these two mentioned. -Kevin On Apr 24, 2009, at 4:51 PM, Danny Burkes wrote: > >> When you're doing something this importan

[Rails] Re: no sql in the controller guideline

2009-05-05 Thread PP Junty
> The code you posted is fine, it just depends where you put it: that is why i named the thread "no sql in the controller". :) > - in a view: super bad > - in the controller: not so good i agree, i just didn't see any mention to this guideline in the books i consulted or in the AR source code c

[Rails] Re: no sql in the controller guideline

2009-05-05 Thread Frederick Cheung
On May 5, 11:52 pm, PP Junty wrote: > Charles Johnson wrote: > > Like all good programming rules of thumb there are interesting > > exceptions. > > this is exactly where things get confused, because code like the > example i provided seems to be the norm, not the exception. > The code you poste

[Rails] Re: no sql in the controller guideline

2009-05-05 Thread PP Junty
Charles Johnson wrote: > Like all good programming rules of thumb there are interesting > exceptions. this is exactly where things get confused, because code like the example i provided seems to be the norm, not the exception. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~

[Rails] Re: string as attribute

2009-05-05 Thread arpit
yeah you are right. Thanks for clarifying :) Frederick Cheung wrote: > > On 5 May 2009, at 15:04, arpit wrote: > > >> I think rather than doing read_attribute, you should do >> >> def get_value_for_column(attribute) >> send(attribute) >> end >> > > Sort of depends what problem you are tr

[Rails] Re: Oracle-JRuby error

2009-05-05 Thread Hassan Schroeder
On Tue, May 5, 2009 at 3:05 PM, Norman Smith wrote: > > I am trying to migrate from RoR/MYSql to JRoR/Oracle. I am using Active > Record JDBC to talk to the database. The Migration process to create and > populate the database tables has been painful. My latest issue is the > method new_date is u

[Rails] Re: string as attribute

2009-05-05 Thread Frederick Cheung
On 5 May 2009, at 15:04, arpit wrote: > > I think rather than doing read_attribute, you should do > > def get_value_for_column(attribute) > send(attribute) > end Sort of depends what problem you are trying to use (eg send won't work if you had a legacy schema with a column name that isn't a

[Rails] Oracle-JRuby error

2009-05-05 Thread Norman Smith
I am trying to migrate from RoR/MYSql to JRoR/Oracle. I am using Active Record JDBC to talk to the database. The Migration process to create and populate the database tables has been painful. My latest issue is the method new_date is undefined in the JDBC adapter. I have the following gems install

[Rails] Re: string as attribute

2009-05-05 Thread arpit
I think rather than doing read_attribute, you should do def get_value_for_column(attribute) send(attribute) end because if you have def something read_attribute(:first) + read_attribute(:second) end then get_value_for_column("something") would not work in case of read_attribute in get_va

[Rails] Assign dynamic (incrementable) values to objects

2009-05-05 Thread mike
I am working on a registration form for users. Users can sign up to attend some sport events and are automatically assigned a starting number depending on the users type. There are several types of users and all have a specific range of starting numbers. 0001 - 0050: not automatically assigend 0

[Rails] Re: Getting 500 Errors on production...

2009-05-05 Thread Charles Johnson
Try the Phusion site and see if the online docs are helpful. I have always been able to diagnose problems with the rails log files coupled with the apache logs. Sorry. :( Cheers-- Charles On Tue, May 5, 2009 at 3:02 PM, Mike C wrote: > > I did take a look in my apache logs and it only seemed to

[Rails] Re: Unable to deactivate forgery protection

2009-05-05 Thread C. R. Oldham
On May 5, 2009, at 2:14 PM, Fernando Perez wrote: > Although I have added: > skip_before_filter :verifiy_authenticity_token Fernando, I'm assuming that the above is not a cut-and-paste from the app? Because "verify" is misspelled. --cro --~--~-~--~~~---~--~---

[Rails] Re: Unable to deactivate forgery protection

2009-05-05 Thread Freddy Andersen
can you try protect_from_forgery :except => [ :create, :other_task ] On May 5, 1:14 pm, Fernando Perez wrote: > Hi, > > I just created a new Rails app that will be receiving some POSTed data > from the outside so it must skip the verify_authenticity_token for some > create actions. Although I

[Rails] Unable to deactivate forgery protection

2009-05-05 Thread Fernando Perez
Hi, I just created a new Rails app that will be receiving some POSTed data from the outside so it must skip the verify_authenticity_token for some create actions. Although I have added: skip_before_filter :verifiy_authenticity_token I still get InvalidAuthenticityToken. In one of my other Rails

[Rails] Re: Getting 500 Errors on production...

2009-05-05 Thread Mike C
I did take a look in my apache logs and it only seemed to log warnings; I didn't see anything that pertained to the error or exception I got. On May 5, 12:36 pm, Charles Johnson wrote: > Try your apache error logs, as well as your system logs. > Cheers-- > > Charles > > On Tue, May 5, 2009 at 12

[Rails] Re: no sql in the controller guideline

2009-05-05 Thread Charles Johnson
Like all good programming rules of thumb there are interesting exceptions. Complicated unions and intersections, especially where the from clause might be a dynamic select, such as might be needed for a report can be very difficult to do without resorting to passing the sql directly to the database

[Rails] Re: no sql in the controller guideline

2009-05-05 Thread Tyler MacDonald
PP Junty wrote: > "Nothing that looks at all like SQL should go into a controller, view, > or helper." > > it really came as a surprise to me as Rails itself seems to go against > such practice by its AR 'conditions' option, which most of the times > contains > SQL code. like in this example fro

[Rails] Re: A Letter to the Authors of Web Authentication Libraries

2009-05-05 Thread Paul Johnston
Hi, Just to clarify: 1) The hash is different for each login, so an attacker can't do a simple replay 2) If JavaScript is not available, you'll usually want to allow the login, although it will be unencrypted. This can be done quite easily. > Which means that if the challenge exists, we don't ne

[Rails] Re: Getting 500 Errors on production...

2009-05-05 Thread Charles Johnson
Try your apache error logs, as well as your system logs. Cheers-- Charles On Tue, May 5, 2009 at 12:35 PM, Mike C wrote: > > Hi, the problem has been fixed but I was basically shooting in the > dark and happened to get a hit. I'm using Debian 5.0 with MySQL 5 for > my production. How does Passe

[Rails] no sql in the controller guideline

2009-05-05 Thread PP Junty
hello. i just checked Chad Fowler's post "20 Rails Development No-No's" and one guideline caught my attention. it says: "Nothing that looks at all like SQL should go into a controller, view, or helper." it really came as a surprise to me as Rails itself seems to go against such practice by its A

[Rails] Re: Database - Switching Tables

2009-05-05 Thread djolley
>  hope it helps, Great answer. Love it! :) I think that I'm a happy camper. Thanks to all who contributed. ... doug --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to

[Rails] Re: Generate dynamic PDFs from RoR apps

2009-05-05 Thread E. Litwin
Or for free, use PDF-Writer or JasperSoft reports http://ruby-pdf.rubyforge.org/pdf-writer/ http://wiki.rubyonrails.org/rails/pages/howtointegratejasperreports?s[]=reporting On May 5, 11:41 am, Kevin Kaiser wrote: > Forgive me for the shameless promotion but I'm posting because I think > you g

[Rails] Re: SQL Server via DBI/ODBC configuration

2009-05-05 Thread Murray Steele
There's a rails-sqlserver google group: http://groups.google.com/group/rails-sqlserver-adapter. You could try asking your question there as the group is more focussed to your setup. >From what I recall I think that this problem is related to ruby DBI & ruby odbc version clashes. Cheers, Murray

[Rails] Generate dynamic PDFs from RoR apps

2009-05-05 Thread Kevin Kaiser
Forgive me for the shameless promotion but I'm posting because I think you guys might find this useful. I'd like to spread the word to the PHP community about a new website that we've launched called Online PDF Printer (www.onlinepdfprinter.com). It's a service that lets developers integrate dyn

[Rails] Re: Database - Switching Tables

2009-05-05 Thread Maximiliano Guzman
Doug Jolley wrote: >> Put each class definition in a separate file > > By "separate file" you mean "separate model", right? I guess I could > do that. My concern is that if I do I may be opening and closing the > connection to the database? Maybe I am and maybe I am not. If I am, > maybe I do

[Rails] Re: Database - Switching Tables

2009-05-05 Thread djolley
> Put each class definition in a separate file By "separate file" you mean "separate model", right? I guess I could do that. My concern is that if I do I may be opening and closing the connection to the database? Maybe I am and maybe I am not. If I am, maybe I don't need to worry about it; bu

[Rails] Re: sticking an erb block in lambda???

2009-05-05 Thread stewbawka
nevermind.. i'm an idiot.. it works you just have to end the %> before the erb block.. duh On May 5, 3:02 pm, stewbawka wrote: > i'm doing some meta stuff and trying to figure out how to stick some > erb html into a proc where i can then feed it to one of many helpers. > > if i do something lik

[Rails] Re: sticking an erb block in lambda???

2009-05-05 Thread Frederick Cheung
On May 5, 7:02 pm, stewbawka wrote: > i'm doing some meta stuff and trying to figure out how to stick some > erb html into a proc where i can then feed it to one of many helpers. > > if i do something like this: > > lamb = lambda do |x| >   <%= x %> > end because you're in a ruby file, not a

[Rails] sticking an erb block in lambda???

2009-05-05 Thread stewbawka
i'm doing some meta stuff and trying to figure out how to stick some erb html into a proc where i can then feed it to one of many helpers. if i do something like this: lamb = lambda do |x| <%= x %> end i get a syntax error because obviously the block isn't actual code.. i want to be able to

[Rails] Re: Getting 500 Errors on production...

2009-05-05 Thread Mike C
Hi, the problem has been fixed but I was basically shooting in the dark and happened to get a hit. I'm using Debian 5.0 with MySQL 5 for my production. How does Passenger keep its logs, if any? On May 5, 7:20 am, Charles Johnson wrote: > What platform/OS are you using for production? What databa

[Rails] Re: Confused about REST and custom actions

2009-05-05 Thread Robert Walker
John Small wrote: > map.resources :accounts,:new => { :authorize => :post } what is :new => { :authorize => :post } Shouldn't that be something like: map.resources :accounts, :collection => { :authorize => :post } But, this does bring up an interesting extension to this discussion about reso

[Rails] Re: Session id length in sessions table

2009-05-05 Thread Frederick Cheung
On May 5, 8:42 am, Joshua Partogi wrote: > Dear all, > > I just created session with rake db:sessions:create and run the migration > also. When I run my apps, my db barfed out saying that the length of > session_id is too long. When I checked into my db, the length of session_id > column in the

[Rails] Re: Session id length in sessions table

2009-05-05 Thread pepe
Hi there, Not a DB expert but as far as I understand when you have a "varying" field you are telling the DB how long the data in the field/column **could be**. If you put a value that is shorter than the maximum possible length the DB should arrange the storage for as much data as you put in the

[Rails] Question regarding has_one and association_build

2009-05-05 Thread Eric L.
In the doc, there's is a note saying association_build "only works if an association already exists. It will NOT work if the association is nil." But in my test, it works fine when the association is nil. For example, class Post < ActiveRecord::Base has_one :author def after_initialize

[Rails] Re: How to reset Rails.cache servers? Rails.cache.reset is undefinied

2009-05-05 Thread pharrington
Are you looking for Rails.cache.clear ? On May 4, 2:04 pm, -kinetic wrote: > I'm trying to get memcached working for my rails app that's running > under passenger.  Apparently we need to check if passenger forked > memcached, and if so we need to establish a new connection using a > reset functi

[Rails] Re: Session ID too long

2009-05-05 Thread César Díaz
Ok, I think that you are not understanding me or I am not understanding you. My problem is not that I want to store the session in the database or that the field for session id is too short. I need the session_id because I want to have anonymous users in my application. These anonymous users w

[Rails] Re: How to reset Rails.cache servers? Rails.cache.reset is undefinied

2009-05-05 Thread pharrington
With Rails 2.3.2, use Rails.cache.clear I'm not sure about older versions, though. On May 4, 2:04 pm, -kinetic wrote: > I'm trying to get memcached working for my rails app that's running > under passenger.  Apparently we need to check if passenger forked > memcached, and if so we need to estab

[Rails] Allowing only one tag per post

2009-05-05 Thread Victor Vlist
I'm using acts_as_taggable_on_steroids to add a tag to a post. For my purposes, I only want to allow one tag per post. I've looked through the acts_as_taggable_on_steroids code and can't really put a finger on where I should even start. I guess I could do this in a number of ways. I could modify i

[Rails] Re: New to Rails, but have a 500 error

2009-05-05 Thread Me
Did you do: ruby script/generate controller On May 4, 7:26 am, Learning wrote: > i'm new to ruby on rails, there's a problem when i follow the guide on > rubyonrails.org > i create a controller like this > #ruby script\generate home index > and edit app/views/home/index.html.erb after that

[Rails] Re: Confused about REST and custom actions

2009-05-05 Thread John Small
As this thread is about REST and custom actions then I'll post a question here. I have a REST client, it will be working with a non-Rails application, but for initial development and testing I'm using a separate Rails REST server to emulate the non-Rails app. As part of the sequence of action

[Rails] Re: Declare global variable in views

2009-05-05 Thread E. Litwin
I agree with Frederick. Depending on what you need, using a session key/value or cookie may be the appropriate way to maintain the data. On May 5, 9:19 am, Frederick Cheung wrote: > On May 5, 2:50 pm, Nike Mike wrote:> how > to declare a variable globally in views without writing in > > contr

[Rails] Re: rake rails:update question

2009-05-05 Thread E. Litwin
Yes, it only updates the project (app) that you are currently navigated to. On May 5, 7:10 am, Stephen Fagan wrote: > Does running the rake rails:update command just update the current rails > app you are in? Sorry if this is a stupid question, I am trying to run 2 > different versions of rails

[Rails] Re: string as attribute

2009-05-05 Thread Anthony Ward
Frederick Cheung wrote: > On May 5, 4:53�pm, Anthony Ward > wrote: >> >> * �I wanted to know if it is possible to achieve what I would like >> to do >> � � � �as the first solution is impossible to do for various reasons >> > > well there's always read_attribute (and remember that > foo

[Rails] Re: Declare global variable in views

2009-05-05 Thread Frederick Cheung
On May 5, 2:50 pm, Nike Mike wrote: > how to declare a variable globally in views without writing in > controller,model or in config > -- that doesn't sound like a good idea. If you can elaborate on what you're trying to do someone might be able to chip in with a neater way of doing things. Fr

[Rails] Re: Database - Switching Tables

2009-05-05 Thread djolley
> if you decide that abstract classes are better, then I suggest that you > do something like this to make your life easier: > > 1: class Person < ActiveRecord::Base > > 2: TypesofPeople = ["Client", "Prospect"] > > 3: def self.abstract_find (person_type, *args) > 4:   if TypesofPeople.include?(pe

[Rails] Re: "gem install rails" error on Windows

2009-05-05 Thread E. Litwin
What version of Ruby are you running? (Run ruby -v from the command prompt) Here is a link to a similar problem - http://dev.rubyonrails.org/ticket/7305 On May 4, 11:14 am, danieljianu wrote: > Hello all. > > I'm having the following problem and I can't seem to find a solution > for it: > runn

[Rails] Re: string as attribute

2009-05-05 Thread Frederick Cheung
On May 5, 4:53 pm, Anthony Ward wrote: > > *  I wanted to know if it is possible to achieve what I would like > to do >        as the first solution is impossible to do for various reasons > well there's always read_attribute (and remember that foo.read_attribute(:bar) is the same as

[Rails] Re: A Letter to the Authors of Web Authentication Libraries

2009-05-05 Thread Marnen Laibow-Koser
SeanWalberg wrote: > OP said it's a challenge-response system. So the server would send a > hidden field in the form (timestamp? md5(rand)? ), the client > concatenates the password and the challenge, md5's it, and returns it. Ah, that makes sense -- dynamic salting. > > The server knows the ch

[Rails] Re: New to Rails, but have a 500 error

2009-05-05 Thread E. Litwin
I would normally say to look in the development.log file for a more detailed explanation. However, you will normally get a detailed error on the browser when running in development mode and the error you described when running in production. Try checking ..\log\production.log to see what the error

[Rails] Re: Database - Switching Tables

2009-05-05 Thread Marnen Laibow-Koser
Doug Jolley wrote: [...] > > IOW, it appears that Rails wants the name of the class to correspond > the base name of the model file (i.e., since the name of the model > file is person.rb, it wants the class to be Person). Yes, this is how Rails works. Put each class definition in a separate fi

[Rails] Re: modalbox rails var interpolation

2009-05-05 Thread Marnen Laibow-Koser
Chris Habgood wrote: > Ok, why does this work? > > <%= button_to_function "Add Site", remote_function( :url => > { :controller => 'addsites', :action => "addsitetomop", :id=> > @mop}, :with => "'site[comp_#{company.id}]=' + $('site_comp_# > {company.id}').value + '&site[customer_#{company.id}]='

[Rails] Re: How to use json in view file

2009-05-05 Thread 7stud --
nirvana wrote: > => [#, > # , country: "usa", year: "2001", amount: 1564>, # country: "usa", y > ear: "2002", amount: 6463>, # "2003", amount > : 150002>, # 5000>, # id: 6, country: "usa", year: "2005", amount: 4150>, # country: "u > sa", year: "2006", amount: 100>, # year: "2000 > ", amount: 100

[Rails] Re: Confused about REST and custom actions

2009-05-05 Thread Marnen Laibow-Koser
Robert Walker wrote: [...] > From my experience starting off with an incorrect assumption about what > something is can engrain bad habits that are hard to break later. Fair enough. I do agree with you there. > It's > best, at least for me, to approach learning something new by > understand

[Rails] Re: select_tag with multiple set to true returns a String in params instead of array

2009-05-05 Thread dinoD
awesome, fixed. thanks fred. On May 5, 11:42 am, Frederick Cheung wrote: > On May 5, 4:07 pm, "dino d." wrote: > > > Hi - I'm trying to get a multi-select box working.  The form shows up > > fine, and I can select multiple items fine, but in the controller, the > > parameter shows up as a sing

[Rails] Re: A Letter to the Authors of Web Authentication Libraries

2009-05-05 Thread Marnen Laibow-Koser
Paul Johnston wrote: > Hi, > > Many web sites have a user name and password login system, and do not > use SSL. As a consequence, users' passwords are transmitted over the > internet unencrypted. [...] > For many years I have provided a JavaScript MD5 library (http:// > pajhome.org.uk/crypt/md5/)

[Rails] Re: Confused about REST and custom actions

2009-05-05 Thread Robert Walker
Marnen Laibow-Koser wrote: > I'll have to look at those. I am, however, not convinced that such > abstruse theoretical discussion will be much help to the OP, who seems > to be just trying to use RESTful design patterns in a simple app. >From my experience starting off with an incorrect assump

[Rails] Re: modalbox rails var interpolation

2009-05-05 Thread Me
Ok, why does this work? <%= button_to_function "Add Site", remote_function( :url => { :controller => 'addsites', :action => "addsitetomop", :id=> @mop}, :with => "'site[comp_#{company.id}]=' + $('site_comp_# {company.id}').value + '&site[customer_#{company.id}]=' + $ ('site_customer_#{company.id

[Rails] string as attribute

2009-05-05 Thread Anthony Ward
Hi I have an object "a_row" with columns first, last, second to retrieve the value first I can do a_row.first but I need to do it a different way like this a_row.get_value_for_colum("first") and in the object class I would have def get_value_for_column(attribute) return attribute end but c

[Rails] Re: Database - Switching Tables

2009-05-05 Thread djolley
> Why not just subclass? I like that approach. It was essentially what I was playing with when I submitted my original post. The problem with it seems to be that I can't reference the subclass. Extending your example, I would like to say something like: clients=Client.find(:all) Rails doesn'

[Rails] rake spec error: uninitialized constant Spec::Rails::Example::RailsExampleGroup

2009-05-05 Thread eng. Ilian Iliev
Hi all, I am absolute radiant/ruby beginner trying to create custom extension (following the tutorail - > http://wiki.github.com/radiant/radiant/adding-custom-radius-tags ) Unfortunately afte calling "rake spec" a get he following error: C:/Ruby/lib/ruby/gems/1.8/gems/radiant-0.7.1/vendor/rail

[Rails] Re: select_tag with multiple set to true returns a String in params instead of array

2009-05-05 Thread Frederick Cheung
On May 5, 4:07 pm, "dino d." wrote: > Hi - I'm trying to get a multi-select box working.  The form shows up > fine, and I can select multiple items fine, but in the controller, the > parameter shows up as a single string, instead of an array of values. > Any ideas? > > The form: > > <%=select_t

[Rails] Intergrate Jasper report to Ruby on Rails Application

2009-05-05 Thread velu
Hi, Im very new in Ruby on Rails. I have to do intergrate jasper report with Rails applications. I found the link http://wiki.rubyonrails.org/rails/pages/HowtoIntegrateJasperReports. But Im not clear how to do. Plz help me this how to do. If anybody have sample application it will be very bette

[Rails] Re: JRuby/glassfish v3 logging problem

2009-05-05 Thread Vivek Pandey
There are some known issues with logging, [1] and [2]. These issues are being worked on and will be available in the next gem version (in couple of weeks). Apparently [1] is the cause of what you are experiencing related to rotation of log files. Since rotation is not working so you as well disabl

[Rails] Re: SQL Server via DBI/ODBC configuration

2009-05-05 Thread Rob
Mike, Did you have any luck with this? Whats described by Harold seems to match everyone elses experience. By any chance would you be on a server for which you don't have root access? I have no troubles with freetds and iodbc getting to the SQL Server that I'm intending to use, but I cannot ge

[Rails] "gem install rails" error on Windows

2009-05-05 Thread danieljianu
Hello all. I'm having the following problem and I can't seem to find a solution for it: running "gem install rails" on a Windows environment generates "ERROR: While executing gem ... (Zlib::BufError)buffer error" I've tried 'gem update --system', but with no success. I am out of sollutions

[Rails] Re: Confused about REST and custom actions

2009-05-05 Thread Marnen Laibow-Koser
Robert Walker wrote: [...] > Trying not to fall into the trap that resources and models are > one-to-one. Resources are independent of any back-end storage model. That's true, but for the typical simple Rails app, they map pretty closely. [...] > I'm not exactly sure how having the action in t

[Rails] Re: Setting DEFAULT_FIELD_OPTIONS in Rails 2.3

2009-05-05 Thread RG
This did not work for me on rails 2.3.2 but got me on the right track. Create a file named vendor/plugins/default_options/init.rb that contains the following: require "default_options" Create a file named vendor/plugins/default_options/lib/ default_options.rb that contains the following: modu

[Rails] Re: SQL Server via DBI/ODBC configuration

2009-05-05 Thread Rob
mvargo: Did you have any luck with this? I can get freetds and iodbc to connect successfully but ruby-odbc just doesn't seem to support a shared (non-root access) linux installation like everything else. I'm blocked as make install tries to put the files in the standard locations and to make th

[Rails] JOBS-Ruby on Rails/LAMP Developer

2009-05-05 Thread RailsRecruiter
Hello Ruby group, I hope you can help me out with a search I am doing for a client of mine. They are looking to add a web UI designer to our rapidly growing engineering team. Candidates for this position should have a minimum of 2 years of web UI development experience including Ruby on Rails, Pr

[Rails] uninitialized constant Article::Text (NameError)

2009-05-05 Thread manju
uninitialized constant Article::Text (NameError) when i exute the program i am getting this err can any one give me the solution for this --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group

[Rails] New to Rails, but have a 500 error

2009-05-05 Thread Learning
i'm new to ruby on rails, there's a problem when i follow the guide on rubyonrails.org i create a controller like this #ruby script\generate home index and edit app/views/home/index.html.erb after that #ruby script\server when i browse the http://localhost:3000/home/index it shows that We're so

[Rails] A Letter to the Authors of Web Authentication Libraries

2009-05-05 Thread Paul Johnston
Hi, Many web sites have a user name and password login system, and do not use SSL. As a consequence, users' passwords are transmitted over the internet unencrypted. This puts them at risk, particularly if the user is on a shared ethernet segment, or open wireless network. For many years I have p

[Rails] Problem with rails 2.3.2 and Erubis 2.6.4

2009-05-05 Thread Jitu
Hi, I am facing some problems migrating from rails 2.1.0 to rails 2.3.2. I am using Erubis 2.6.4. I get the following error when I start the webrick server. Rendering template within layouts/login Rendering login/login ActionView::TemplateError (undefined method `link_to' for #) in app/views/ l

[Rails] Re: In lieu of scaffolding...

2009-05-05 Thread Marnen Laibow-Koser
Brendon Whateley wrote: > ActiveScaffold brings with it a lot of magic. If you do everything > and name everything the way it wants, all is good. It does want helper methods named a certain way, but so what? > Otherwise, If you > have model names or table names that don't follow the way it wo

[Rails] Re: Confused about REST and custom actions

2009-05-05 Thread Robert Walker
Yanni Mac wrote: > I am new to the whole RESTful idea and I am trying to use it in a new > version of my app. I might be totally missing the ball here, but this > is what I am trying to do. I have an application that is 95% read-only > to the public users, with a back end administration availabl

[Rails] select_tag with multiple set to true returns a String in params instead of array

2009-05-05 Thread dino d.
Hi - I'm trying to get a multi-select box working. The form shows up fine, and I can select multiple items fine, but in the controller, the parameter shows up as a single string, instead of an array of values. Any ideas? The form: <%=select_tag "items", @items, :multiple => true :onchange => "t

[Rails] Re: Getting 500 Errors on production...

2009-05-05 Thread Charles Johnson
What platform/OS are you using for production? What database. Inquiring minds want to know. :) Cheers-- Charles On Tue, May 5, 2009 at 1:00 AM, Mike C wrote: > > I'm getting 500 errors on my production server running Passenger. I > cannot, for the life of me, find out what the problem is. Every

[Rails] rake rails:update question

2009-05-05 Thread Stephen Fagan
Does running the rake rails:update command just update the current rails app you are in? Sorry if this is a stupid question, I am trying to run 2 different versions of rails and need to upgrade one of my apps. thanks Steve. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~---

[Rails] Re: In lieu of scaffolding...

2009-05-05 Thread Brendon
ActiveScaffold brings with it a lot of magic. If you do everything and name everything the way it wants, all is good. Otherwise, If you have model names or table names that don't follow the way it works, you will have to change your code or be in for a lot of hurt. By the time you are up to 100

[Rails] Confused about REST and custom actions

2009-05-05 Thread Yanni Mac
I am new to the whole RESTful idea and I am trying to use it in a new version of my app. I might be totally missing the ball here, but this is what I am trying to do. I have an application that is 95% read-only to the public users, with a back end administration available to our staff (basically

[Rails] Re: will_paginate not showing

2009-05-05 Thread Stephen Fagan
Franz Strebel wrote: > On Mon, Sep 22, 2008 at 1:41 PM, MR Damien > > wrote: > >> >> I though this argument was facultative. >> > > If you don't specify anything, it will display 30 :per_page > > Franz Thanks Franz, you know I originally had that but it did not work either. Turns out my loop

[Rails] Declare global variable in views

2009-05-05 Thread Nike Mike
how to declare a variable globally in views without writing in controller,model or in config -- 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

[Rails] Re: How to use json in view file

2009-05-05 Thread nirvana
=> [#, #, #, #, #, #, #, #, #, #, #, #, #, #, #, #, #, #, #, #, #] On May 5, 4:49 pm, 7stud -- wrote: > mrbless wrote: > > In my controller I have found all the movies like this > > @budgets=Budget.find(:all).to_json > > > Now in the view file what i want to do is something like this > > > >

[Rails] Re: CookieStore and setting an expiration

2009-05-05 Thread Jarl Friis
etienne writes: > That overwrites the cookie for the session. By the time they attempt > to login, a session has already begun for them. CookieStore is doing > the management behind the scenes. I want to amend the cookie to have > an expiration date which, it seems, it does not have by defaul

[Rails] Re: moving a project from windows to linux

2009-05-05 Thread Sazima
Hey Adam, Copying usually works, but is the dirty solution. I usually create the whole rails environment in the target machine and then just checkout the application as usual. Cheers, Sazima On May 4, 11:04 am, Adam Akhtar wrote: > How easy is it to do this. Is it simply a case of copying the

[Rails] Re: will_paginate problem

2009-05-05 Thread Maurício Linhares
I guess this is what you're trying to do: def index @blog_entries = Entry.paginate( :page => params[:page], :per_page => 4, :include => :user, :order => 'topics.updated_at ) end - Maurício Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) On Tue, May 5, 2

[Rails] Re: query returning just one value

2009-05-05 Thread Maurício Linhares
First you need to explain what you do want returned and your database structure. - Maurício Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) On Tue, May 5, 2009 at 8:59 AM, Vapor .. wrote: > > Maurício Linhares wrote: >> This query is never going to return a

[Rails] will_paginate problem

2009-05-05 Thread Stephen Fagan
Hi all, I'm having a bit of a problem with displaying a blog list using the will_paginate helper. My code is: entries_controller: def index @entries = Entry.find(:all) @blog_entries = @entries.paginate( :page => params[:page], :per_page => 4, :include

[Rails] Re: Make a little to an outside website

2009-05-05 Thread Sean Six
Sean Six wrote: > I want to allow users to post links to outside website on my site. How > can this be done? I meant to say "make a (link)" in the title. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are su

  1   2   >