[Rails] Re: shell cmd fails from Rails (not from CLI & Ruby script)

2009-04-12 Thread Greg Willits
Greg Willits wrote: > Rails 2.3.2, OS X 10.5.6 > > I am using the backtick method to run a shell command (happens to be > ImageMagick stuff). > I'm still trying to understand the nature of the failure, but if I use > 2>&1 at the end of the command, I can log an error message: > "dyld: Library n

[Rails] shell cmd fails from Rails (not from CLI & Ruby script)

2009-04-12 Thread Greg Willits
Rails 2.3.2, OS X 10.5.6 I am using the backtick method to run a shell command (happens to be ImageMagick stuff). The command works fine when I use it directly in Terminal. The command work fine if I extract the code out of Rails and put it into a text.rb file. From inside a Rails app it fails.

[Rails] Re: Creating Methods in the Model?

2009-04-12 Thread Andrew Timberlake
On Mon, Apr 13, 2009 at 6:27 AM, Nick Faraday wrote: > > Hey Everyone. > > First day diving in to ROR and Ruby... > > My question is how do you define methods with in the model class and/or > should I even be doing this? > > It is my understanding that you should put as much of the business logic

[Rails] Re: Storing request-scoped data in a model

2009-04-12 Thread Andrew Timberlake
On Fri, Apr 10, 2009 at 9:25 AM, Shak Shak wrote: > > Andrew Timberlake wrote: >> On Thu, Apr 9, 2009 at 5:40 PM, Shak Shak >> wrote: >>> doesn't need to (in fact, shouldn't) last past a single request. >>> >>> An instance variable in ApplicationController sounds like it would do >>> this, but I

[Rails] Re: Select in partial not behaving

2009-04-12 Thread Ram
Sure.. lets take this outside! ;) It'll help if you send me the code with the flow for one action that works and one that doesnt. no promises :). On Apr 13, 10:10 am, Chris Habgood wrote: > Ok, you asked what a mop was. > > ajaxAddtoMop just makes the association between the contact and form th

[Rails] Re: Select in partial not behaving

2009-04-12 Thread Chris Habgood
Ok, you asked what a mop was. ajaxAddtoMop just makes the association between the contact and form then updates the select removing the user from the select box. I have quite a few rjs and partials to make the full CRUD operations working ajax wise inline in the form. I can go offline if you re

[Rails] Re: Select in partial not behaving

2009-04-12 Thread Ram
I meant the flow of control in the code. >From the view to the controller action, to the RJS and back to the view. I dont see a call to ajaxAddToMop. What are the names of the files with the RJS and the select_box? >if I do a delete or if I remove the >contact from the form I also do a replace li

[Rails] Re: Uploading to S3 without hitting the local server

2009-04-12 Thread Andrew Timberlake
On Sun, Apr 12, 2009 at 12:38 AM, Steve Dogers wrote: > > Hi, I guess my question is rather simple, is it possible to upload to S3 > without hitting the local server using Rails? If so, are there any > tutorials or similar things around? > > PS: and what about being able to display a progress bar

[Rails] Re: Select in partial not behaving

2009-04-12 Thread Chris Habgood
Well it is a telecom thing. If you perform maintenance on equipment then you need a form explaining what to do and how to do it. Anyway, the partial gives me a "prompt" if I do a delete or if I remove the contact from the form I also do a replace like on an New contact and it does give me a promp

[Rails] Re: invalid byte sequence utf-8 OR best option to sanitize content brought in with net::http? single non-utf character causes rails to crash

2009-04-12 Thread buddycat
ok. found this patch to ../railties/lib/commands/console.rb https://rails.lighthouseapp.com/attachments/93770/script-console-invoke-used-rubys-irb.diff as script/console is just a wrapper for console.rb, that is the place to intervene. stock rails just ends up calling your default irb without bo

[Rails] Creating Methods in the Model?

2009-04-12 Thread Nick Faraday
Hey Everyone. First day diving in to ROR and Ruby... My question is how do you define methods with in the model class and/or should I even be doing this? It is my understanding that you should put as much of the business logic into the model as possible. I want to do some data manipulation bef

[Rails] Re: Select in partial not behaving

2009-04-12 Thread Ram
Not able to understand the flow of control. What is mop? Could you explain a bit further? This is interesting.. On Apr 12, 3:13 am, Me wrote: > Ok this is weird, I have full CRUD working for my contacts table all > doing ajax inline in my form.  the odd one is that my delete funtion > uses the s

[Rails] Re: user display preferences options

2009-04-12 Thread Ram
restful_authentication plugin. also has roles for authorization. http://github.com/technoweenie/restful-authentication/tree/master http://railsforum.com/viewtopic.php?id=14216 On Apr 13, 12:15 am, Rick wrote: > What you're dealing with is the authenticate / authorize sequence. > > Authenticate c

[Rails] how to display javascript code returned by rjs template?

2009-04-12 Thread Jack Yang
One quick question: How can I see the javascript code generated by my rjs template? -- 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 t

[Rails] Rails Nested Object Form *_attributes problem

2009-04-12 Thread Damon Rolfs
I'm using Rails 2.3.2, and trying to get a nested object form to work properly. I've narrowed my problem to the issue that Rails is not setting my nested form elements with the *_attributes required to initiate the accepts_nested_attributes_for processing. So instead of params being: {"person"=>{

[Rails] Re: date_select and HTML options?

2009-04-12 Thread Jason
Thanks, that worked. Still learning when to hash it up ;) --~--~-~--~~~---~--~~ 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 unsubsc

[Rails] Re: Architectual question: Engine with all common models

2009-04-12 Thread Andrew Bloom
One issue with splitting the application into 3 will be consistency of deployment. If the models in the engine change you need to at a minimum run all the tests in all 3 systems, and possibly make updates, then find the time to deploy all 3. I know these situations are solvable, but I don't think

[Rails] Re: Multi-button form

2009-04-12 Thread Bharat Ruparel
Following up: The problem is solved: Here is the solution: I had to convert the id from integer to string as shown below: @status_array = ProspectStatus.all.collect {|e| [e.name,e.id.to_s]} Bharat -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~-

[Rails] Re: Error in Mysql Connection

2009-04-12 Thread Darren Bishop
Trejkaz Xx wrote: > Darren Bishop wrote: >> So for now simply try cp %MYSQL_HOME%\bin\libmySQL.dll %RUBY_HOME%\bin. > > The way I saw it, if Rails used to support MySQL without installing > MySQL, then it should still work -- hence I don't have a %MYSQL_HOME% to > copy a DLL from, hence why my

[Rails] Re: Multi-button form

2009-04-12 Thread Bharat Ruparel
Hello Perry, Thanks for your time. I managed to fake it :). Actually, it looks even better and it works too! here is what I did: <% form_tag({:controller => controller_name, :action => 'index'}, {:method => :get, :class => 'form'}) do %> <%= radio_button_tag(

[Rails] Re: Blackberry & handhelds

2009-04-12 Thread JannaB
Yes and it appears Rails may be particularly good at doing exactly the! Thank you both for your postings. -Janna On Apr 12, 11:45 am, Hassan Schroeder wrote: > On Sun, Apr 12, 2009 at 6:46 AM, Frederick Cheung > > wrote: > > Along side your html.erb template you'd have a > > phone.erb template

[Rails] Re: invalid byte sequence utf-8 OR best option to sanitize content brought in with net::http? single non-utf character causes rails to crash

2009-04-12 Thread buddycat
thanks hector, i think you are right about the console. i tried the non-compat change to case statements in ruby 1.9 with colons and console seemed fine with that. so i guess somehow even though i change script/console to #!/usr/local/ruby1.9/bin/ruby or even comment out the sherbang and rename i

[Rails] Re: invalid byte sequence utf-8 OR best option to sanitize content brought in with net::http? single non-utf character causes rails to crash

2009-04-12 Thread buddycat
thanks hector, i think you are right about the console. i tried the non-compat change to case statements in ruby 1.9 with colons and console seemed fine with that. so i guess somehow even though i change script/console to #!/usr/local/ruby1.9/bin/ruby or even comment out the sherbang and rename i

[Rails] Re: Multi-button form

2009-04-12 Thread pedz
Well, I don't know the answer to your main question. The reason changing to post goes to the create action is because that is what resource routes do. Do "rake routes" and notice that the URL to the index and the create are the same except one is GET and the other is POST. It may help to look a

[Rails] Re: Unit test problem,

2009-04-12 Thread Phlip
pedz wrote: > In my case I have a model named LppBase. Pluralize becomes > lpp_bases. But if you singularize it back, it became lpp_basis. So, > I had to add an entry in the inflections file. All your basis are belong to Rails. --~--~-~--~~~---~--~~ You recei

[Rails] Re: Architectual question: Engine with all common models

2009-04-12 Thread Marnen Laibow-Koser
Carsten Gehling wrote: > I am maintaining a large Rails application, that consists of several > "interfaces": > > 1) The web interface (figures) > 2) Import of data from external providers > 3) Export of data to a large range of customers > > It seems to me quite bloated to have all the code fro

[Rails] Re: Unit test problem,

2009-04-12 Thread pedz
On Apr 6, 7:23 am, Phlip wrote: > > It also expects to convert between CamelCase and under_scored so if   > > your model is AggregationFeedMap, the file defining it should be app/ > > models/aggregation_feed_map.rb and the table name should be   > > aggregation_feed_maps and the fixture found in

[Rails] Re: Problems with in_place_editor_field

2009-04-12 Thread Sergey Potapov
Wow! Cool! It's working! Thank you very much! -- 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-t

[Rails] Re: Testing RESTful actions (put/post)

2009-04-12 Thread Shaum Sona
REST is a suggested architecture style. Rails does not enforce it. -- 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

[Rails] rails 2.3 nested forms with has_many through checkboxes

2009-04-12 Thread OKR
I was wondering if anyone knew of a way to combine the new nested forms in rails 2.3 with a has_many through relationship via checkboxes. Basically I have a page model, a page_category model and a category_items join table. Pages have many page categories through category items. The category_it

[Rails] Multi-button form

2009-04-12 Thread Bharat Ruparel
It cannot be this difficult, especially in rails. Here is my form code in a partial for the index action of a controller: <% form_tag({:controller => controller_name, :action => 'index'}, {:method => :get, :class => 'form'}) do %> <%= label_tag :search, "Search b

[Rails] Re: rake aborted! undefined method `each' for #

2009-04-12 Thread Kevin Kleinfelter
If you get "rake aborted! undefined method `each' for..." on Windows (win32), it is almost certainly a mismatch between the version of MySQL and the version of the gem. Looking at the readme inside the .gem, it says that the gem was compiled against MySQL 5.0.27. V2.7.3 of the pre-compiled g

[Rails] Re: RSS Feed parsing problem

2009-04-12 Thread Nick Hoyle
Nick Hoyle wrote: > hi thanks for the reply, was much needed. > > I knew what i was trying to do which was like you say call each of the > items in the array i just wasnt sure how to do it, and attempted a > similar type of loop but had no luck. > > I will look into this and see if i can achie

[Rails] Re: [ANN] assert2 presents assert_no_rjs_, and .should send_js_to

2009-04-12 Thread Brandon Olivares
> -Original Message- > From: rubyonrails-talk@googlegroups.com [mailto:rubyonrails- > t...@googlegroups.com] On Behalf Of Phlip > Sent: Sunday, April 12, 2009 12:54 PM > To: rubyonrails-talk@googlegroups.com > Subject: [Rails] Re: [ANN] assert2 presents assert_no_rjs_, and .should > send

[Rails] Re: RSS Feed parsing problem

2009-04-12 Thread Nick Hoyle
hi thanks for the reply, was much needed. I knew what i was trying to do which was like you say call each of the items in the array i just wasnt sure how to do it, and attempted a similar type of loop but had no luck. I will look into this and see if i can achieve what i want Thanks alot nic

[Rails] Testing RESTful actions (put/post)

2009-04-12 Thread Carlos Santana
I am trying to test my update method: put :update, {:id => topics(:one).id, :topics => {:title => 'Updated Unique Title'}}, {:user => users(:admin).id, :user_role => users(:admin).role.name} The above statement works fine and test returns positive result. I thought doing post for an update should

[Rails] Re: background process fork - generating zip files

2009-04-12 Thread Carlos Santana
- How do I know when it is complete? Ideally, I would like to send zip file once the process is complete rather than giving arbitrary sleep time. - Is it possible to get an estimate of this? - Thanks, CS. Frederick Cheung wrote: > On 12 Apr 2009, at 05:26, Carlos Santana wrote: >> thought abov

[Rails] Re: RSS Feed parsing problem

2009-04-12 Thread David Knorr
On 12 Apr., 18:59, Nick Hoyle wrote: > I want to parse multiple feeds but i have ran into problems > > Im doing a query on a table which returns rss feed urls stored in an > instance variable called @urls . > > with each of these eed urls i want to parse them like below > > @feeds = SimpleRSS.p

[Rails] Re: Can't get an Array function to be visible inside Applic

2009-04-12 Thread Frederick Cheung
On 12 Apr 2009, at 18:37, Sj Tib wrote: > >> Because you write that inside the ApplicationHelper module, this is >> creating a new ApplicationHelper::Array class with those 2 methods. >> In >> you test.rb it's not nested in a module. If you wrote your array >> extensions outside of the module

[Rails] Re: user display preferences options

2009-04-12 Thread Rick
What you're dealing with is the authenticate / authorize sequence. Authenticate covers topics such as login / password / session access to the site. Authorize covers role (or other) based access within the site. Google either for gems / plugins / discussions On Apr 11, 8:08 pm, Tam Kbe wrote:

[Rails] Re: Unit test problem with time update

2009-04-12 Thread Ps_gem Sh_gem
http://sports.yahoo.com/ncaaf/teams/aad/ical.ics was just an example of a link to download iCalendar feed, it can be from anywhere so I used feed_1, feed_2...feed_n for generic term. This worked: def test_updatefeed feed = feeds(:feed_1) feed.update_attribute :lastupdate, 1.hour.

[Rails] Undefined method `cache_template_extension' - Not finding how to fix that

2009-04-12 Thread Felipe Lopes
Hello I upgraded my rails to the version 2.3.2, but after restarting my server, this error happened, I researched in some threads and discovered that cache_template_extensions is deprecated, but i couldn't find it in anyway in my code, please, can you help me to fix this issue??? Thank you. =>

[Rails] Re: Can't get an Array function to be visible inside Applic

2009-04-12 Thread Sj Tib
> Because you write that inside the ApplicationHelper module, this is > creating a new ApplicationHelper::Array class with those 2 methods. In > you test.rb it's not nested in a module. If you wrote your array > extensions outside of the module you shouldn't have this problem. > (Personally I woul

[Rails] RSS Feed parsing problem

2009-04-12 Thread Nick Hoyle
I want to parse multiple feeds but i have ran into problems Im doing a query on a table which returns rss feed urls stored in an instance variable called @urls . with each of these eed urls i want to parse them like below @feeds = SimpleRSS.parse open(@urls.feed_url) however this only works wh

[Rails] Re: [ANN] assert2 presents assert_no_rjs_, and .should send_js_to

2009-04-12 Thread Phlip
Brandon Olivares wrote: > Is there any plan to allow for negative assertions (e.g., should_not > be_html_with)? I use this in a custom matcher, and can't think of a way to > support negative assertions unless be_html_with does. I can't think of a reason not to use .should be_html_with{ without!{

[Rails] Re: handling ActiveRecord::RecordNotFound

2009-04-12 Thread Frederick Cheung
On 12 Apr 2009, at 17:43, Amita Bhatkhande wrote: > > Instead of repeating this for show, edit, and delete in every > controller, I would like to put this into an application_controller. > How > do I pass current controller name to the application controller? The > controller and model names a

[Rails] Re: [ANN] assert2 presents assert_no_rjs_, and .should send_js_to

2009-04-12 Thread Brandon Olivares
Phlip, Is there any plan to allow for negative assertions (e.g., should_not be_html_with)? I use this in a custom matcher, and can't think of a way to support negative assertions unless be_html_with does. I'm of course going by the output of negative_failure_message saying not to use it that way

[Rails] handling ActiveRecord::RecordNotFound

2009-04-12 Thread Amita Bhatkhande
How should we handle requests for invalid objects which do not exist in database, ActiveRecord::RecordNotFound error ? I am writing begin-rescue as follows: def show begin @phone = Phone.find(params[:id]) rescue ActiveRecord::RecordNotFound flash[:notice] = NONEXIST_OBJECT

[Rails] Re: background process fork - generating zip files

2009-04-12 Thread Frederick Cheung
On 12 Apr 2009, at 05:26, Carlos Santana wrote: > > > - The problem is when I click/call on this method for the first time > then it does not work saying missing file. The zip file is not ready > at > that point. > - If I go back and click again then it works fine and instantaneously > delivers

[Rails] Re: Error in Mysql Connection

2009-04-12 Thread Trejkaz Xx
Darren Bishop wrote: > So for now simply try cp %MYSQL_HOME%\bin\libmySQL.dll %RUBY_HOME%\bin. The way I saw it, if Rails used to support MySQL without installing MySQL, then it should still work -- hence I don't have a %MYSQL_HOME% to copy a DLL from, hence why my instructions mention pilferin

[Rails] Re: [ANN] assert2 presents assert_no_rjs_, and .should send_js_to

2009-04-12 Thread Phlip
> assert_no_rjs_ now negates all the JavaScript assertions listed here: > > http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/49fd7c9b9107d577 > (Sorry - no .should not_send_js_to yet..;) Version 0.5.1 fixes that: .should_not send_js_to Next, assert_xhtml (and .should be_htm

[Rails] Re: background process fork - generating zip files

2009-04-12 Thread Carlos Santana
Anyone? Carlos Santana wrote: > I am trying to generate a static archive (zip) as follows: > > Model has following method > def generate_archive > dir = "/tmp/#{self.id}" > title = self.title.gsub(/^\s+/, '').gsub(/\s+$/, '').gsub(/\s+/, > '-') > . .` > ### ##

[Rails] Re: invalid byte sequence utf-8 OR best option to sanitize content brought in with net::http? single non-utf character causes rails to crash

2009-04-12 Thread Hector Gomez
1) 1.9 is the wild wild west unfortunately, even more in all this encoding mess so as a developer right now is your responsability to transcode any external data to UTF-8(or you encoding of choice). I have sent a GSOC proposal to resolve this problems and let rails handle this problems for you and

[Rails] Re: Blackberry & handhelds

2009-04-12 Thread Hassan Schroeder
On Sun, Apr 12, 2009 at 6:46 AM, Frederick Cheung wrote: > Along side your html.erb template you'd have a > phone.erb template with dumbed down content/presentation/etc. A minor quibble: translating a data-rich application from a full-size computer screen to be usable and useful on a tiny scree

[Rails] Re: Problems with in_place_editor_field

2009-04-12 Thread Dingding Ye
http://github.com/rails/in_place_editing/tree/master Get the new version here. On Sun, Apr 12, 2009 at 10:41 PM, Sergey Potapov < rails-mailing-l...@andreas-s.net> wrote: > > I found out it didn't work because of protect_from_forgery (protection > from CSRF attaks). So I commented string "protec

[Rails] Re: Problems with jRails and ajax helpers

2009-04-12 Thread Brent Collier
I've submitted the problem to the jRails people here: http://code.google.com/p/ennerchi/issues/detail?id=41 -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:

[Rails] params[:commit] doesn't work

2009-04-12 Thread Jack Yang
I have a form with two submit buttons: "Save" and "Preview". In my controller for this form, I do different things based on params[:commit]. But somehow the params[:commit] always evals "Save", even when I click Preview button. Why? any idea will be appreciated. This is my view: <% remote_form_fo

[Rails] Re: params[:commit] doesn't work

2009-04-12 Thread Jack Yang
Oh, I found the problem myself. I have a hidden field hold the post_id after I saved the post. So when I click save button with a form has post_id field it will trigger the update action, not the create action, which will publish the post. -- Posted via http://www.ruby-forum.com/. --~--~

[Rails] Re: params[:commit] doesn't work

2009-04-12 Thread Frederick Cheung
On Apr 12, 4:01 pm, Jack Yang wrote: > Thanks Fred. I haven't try using submit_to_remote, but I think you are > right. > I just changed the form back to normal form without ajax. This time the > "Publish" button works correctly but the "Save" button behaves weird. > The first time I click it, i

[Rails] Re: params[:commit] doesn't work

2009-04-12 Thread Jack Yang
Frederick Cheung wrote: > On Apr 12, 2:55�pm, Jack Yang > wrote: >> I have a form with two submit buttons: "Save" and "Preview". In my >> controller for this form, I do different things based on >> params[:commit]. But somehow the params[:commit] always evals "Save", >> even when I click Preview

[Rails] Re: Problems with jRails and ajax helpers

2009-04-12 Thread Phlip
Brent Collier wrote: > Does anyone have any idea what the problem might be? Also, jrails does not ship with tests. I ought to remember to check them before adding a plugin... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

[Rails] Re: params[:commit] doesn't work

2009-04-12 Thread Frederick Cheung
On Apr 12, 2:55 pm, Jack Yang wrote: > I have a form with two submit buttons: "Save" and "Preview". In my > controller for this form, I do different things based on > params[:commit]. But somehow the params[:commit] always evals "Save", > even when I click Preview button. Why? any idea will be

[Rails] Re: Problems with jRails and ajax helpers

2009-04-12 Thread Phlip
Brent Collier wrote: > I working on a Rails 2.2.2 app that uses jRails and any time I attempt > to use a Rails ajax helper, I get the following error: > > index 116545 out of string > > with this stack trace: > > vendor/plugins/jrails/lib/jrails.rb:197:in `[]=' > vendor/plugins/jrails/lib/jrail

[Rails] Problems with jRails and ajax helpers

2009-04-12 Thread Brent Collier
I working on a Rails 2.2.2 app that uses jRails and any time I attempt to use a Rails ajax helper, I get the following error: index 116545 out of string with this stack trace: vendor/plugins/jrails/lib/jrails.rb:197:in `[]=' vendor/plugins/jrails/lib/jrails.rb:197:in `build_callbacks' vendor/pl

[Rails] Re: Problems with in_place_editor_field

2009-04-12 Thread Sergey Potapov
I found out it didn't work because of protect_from_forgery (protection from CSRF attaks). So I commented string "protect_from_forgery" in ApplicationContoller and it works! But I still don't how to make it works using protection... -- Posted via http://www.ruby-forum.com/. --~--~-~--~-

[Rails] Re: Blackberry & handhelds

2009-04-12 Thread Frederick Cheung
On Apr 12, 1:29 pm, JannaB wrote: > I notice when I go to a site like schwab.com, they have their full > format page come up when I log on via a computer. However, if I log on > via my blackberry, it;s dramatically stripped down. > > I realise much of this is done by my blackberry - the disrega

[Rails] link/url helper with/for plugin routes

2009-04-12 Thread smacks
hi guys, basically following the rails plugin guide, i set up a plugin with routing, controllers, models, etc. now i'd also like to use the link/ url helper to do something like "link_to pluginName_path" or "redirect_to pluginName_firstPluginController_path", but just can't find out how. my plug

[Rails] Blackberry & handhelds

2009-04-12 Thread JannaB
I notice when I go to a site like schwab.com, they have their full format page come up when I log on via a computer. However, if I log on via my blackberry, it;s dramatically stripped down. I realise much of this is done by my blackberry - the disregarding of graphics, not paying attention to tab

[Rails] Heroku Garden - reversing or changing a 'generate scaffold' command

2009-04-12 Thread Clive
In Heroku Garden, is there a way of reversing or changing a 'generate scaffold' command? I often find I need to make changes to the scaffolded application but I do not know how to. 'script/destroy scaffold Modelname' from the console doesn't seem to work. For example, I generated a Product scaffo

[Rails] Re: Architectual question: Engine with all common models

2009-04-12 Thread Carsten Gehling
I allow myself to bump this question just once, since I believe, that it is quite relevant at the moment, considering the release of Rails 2.3 - Carsten -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are sub

[Rails] Re: a client and a contractor are both users, share some attrib but not others, how to implement as users

2009-04-12 Thread Bharat
I would second that. I have a project similar to yours and I have separate users and clients tables. Only keep the login information in Users table, e.g., username, encrypted_password, any other things such as layout_themes (in my case) and also a second table called clients where you keep clien

[Rails] Re: Inserting data from 1 table to another by using find_by_sql

2009-04-12 Thread Salil Gaikwad
> Well you wouldn't want to be doing that on every single request, but > if you do need to move that amount of data around, why not. > > Fred Hi Fred, Ok. Thanks again for your quick reply Regards, Salil -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~

[Rails] Re: Inserting data from 1 table to another by using find_by_sql

2009-04-12 Thread Frederick Cheung
On Apr 12, 8:37 am, Salil Gaikwad wrote: > > Fred i want to know one more thing is it good practise for inserting > thousands of data from one table to another? > waiting for your reply... > Well you wouldn't want to be doing that on every single request, but if you do need to move that amount

[Rails] Re: Can't get an Array function to be visible inside ApplicationHelper

2009-04-12 Thread Frederick Cheung
On Apr 12, 3:52 am, skt wrote: > Folks, > > I seem to be missing something basic here. > > I am trying to call a function from my application layout that will > return me a hash of the roles for the user currently signed in. Here > is the simplified code I have in ApplicationHelper module > >  

[Rails] http://www.streetcandy.org china cheap wholesale ,air jordan shoes,air force one shoes.paypal accept!

2009-04-12 Thread nikeshoes
Get Nike Shoes at Super Cheap Prices Discount Nike air jordans (www.streetcandy.org) Discount Nike Air Max 90 Sneakers (www.streetcandy.org) Discount Nike Air Max 91 Supplier (www.streetcandy.org) Discount Nike Air Max 95 Shoes Supplier (www.streetcandy.org Discount Nike Air Max 97 Trainers (

[Rails] http://www.streetcandy.org china cheap wholesale ,air jordan shoes,air force one shoes.paypal accept!

2009-04-12 Thread nikeshoes
Get Nike Shoes at Super Cheap Prices Discount Nike air jordans (www.streetcandy.org) Discount Nike Air Max 90 Sneakers (www.streetcandy.org) Discount Nike Air Max 91 Supplier (www.streetcandy.org) Discount Nike Air Max 95 Shoes Supplier (www.streetcandy.org Discount Nike Air Max 97 Trainers (

[Rails] invalid byte sequence utf-8 OR best option to sanitize content brought in with net::http? single non-utf character causes rails to crash

2009-04-12 Thread buddycat
hi all, platform: debian lenny, ruby1.91.p0, passenger/apache-multithread, rails2.3 in vendor/postres and sql server via odbc. all current gems. i have legacy asp content on win2k servers that i wrap in rails controllers. this all worked great with ruby1.8, but now that we are dealing with encod

[Rails] Re: Inserting data from 1 table to another by using find_by_sql

2009-04-12 Thread Salil Gaikwad
> That's not a good idea. When you use find_by_sql, rails will try and > create a result set array (because it assumes you are doing a select). > RoyaltyReportFiles.connection.execute allows you to execute arbitrary > sql, however if you are doing an insert you should use > RoyaltyReportFiles.con