[Rails] Re: Changing the model_path.

2010-07-26 Thread Joe
Can anyone help with this? I really need help, Please Help, Thanks In Advance, Joe -- 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...@googlegroups.com. To unsubscribe from this group,

[Rails] Re: Re: Re: Re: Memcache

2010-07-26 Thread Prachi Tripathi
Hi, I guess you write. I used memcache the rails way. I have one more doubt. I want a write through cache mechanism. How to enable that? Is there some configuration? Also, found that cache-money is a write through as well as read only cache. I wanted to know how to configure it to behave as w

Re: [Rails] How to create a 'suggestion' app.???

2010-07-26 Thread catz
Every answer for the question should have their own score. Map the total score to the specific board. That's it. It's something like dummy tests in the newspapers. 70-100 ~> Board 1 40-70 ~> Board 2 0-40 ~> Board 3 > > -- You received this message because you are subscribed to the Google Groups

Re: [Rails] tutorials for virtual rails

2010-07-26 Thread catz
probably it might be interesting for you http://techiferous.com/2010/07/roadmap-for-learning-rails/ Roman > -- 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...@googlegroups.com. To unsu

[Rails] Re: rails asset cache

2010-07-26 Thread Tom Mac
Hi Could anybody please clarify my doubt? 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-t...@googlegroups.com. To unsubscribe from

[Rails] Capistrano - override default, get/copy source from local

2010-07-26 Thread David Kahn
I am working on getting Capistrano running for an app but need to ask it to download source to a local directory and then send it to the deployment server via scp/etc (there are reasons for this I won't get into). Below is where I am and what I am trying --- if anyone has done this or can show me w

Re: [Rails] Re: tutorials for virtual rails

2010-07-26 Thread jason white
i don't think you will find anything specific to Virtual Rails here are some of my favorites http://railscasts.com http://peepcode.com http://railstutorial.org http://pragprog.com Jason On Mon, Jul 26, 2010 at 8:07 PM, Rich d wrote: > yeah i think i found some tutorials that i need but im sti

[Rails] Re: tutorials for virtual rails

2010-07-26 Thread Rich d
yeah i think i found some tutorials that i need but im still open to suggestions On Jul 26, 5:48 pm, Rich d wrote: > I just finished installing virtual box and virtual rails on my laptop > running vista os.  this is all I know other then a bit of ruby code. > im just starting out and learning ROR

[Rails] tutorials for virtual rails

2010-07-26 Thread Rich d
I just finished installing virtual box and virtual rails on my laptop running vista os. this is all I know other then a bit of ruby code. im just starting out and learning ROR on my own. Does anyone have recommendations for tutorials on virtual rails? -- You received this message because you ar

Re: [Rails] Re: Re: Re: Re: Problem with reading cgi cookie

2010-07-26 Thread Greg Donald
2010/7/26 Pål Bergström : > That I know. I was hoping to do something similar to what I had before, > when I could use cgi. Something easy using before_save and after_find. > > What I want to achieve is to aes encrypt selected columns in the > database using a key stored in the users browser as a c

[Rails] Default rendered error file and hash to nice string how to

2010-07-26 Thread Fernando Perez
Hi, When rails raises an exception which file (view?) gets rendered and outputs in the browser the backtrace, request, parameters, etc. I'm asking that because I'd like to know if Rails provides an easy way to convert a hash to a readable string, eg: "{:key => 'value'}" instead of yukky #to_s wh

[Rails] How to create a 'suggestion' app.???

2010-07-26 Thread RubyonRails_newbie
Hi there, I'd like to have a go at building an app whereby people fill in a series of questions based on their ski/snowboard taste etc... Once completed, the app suggests a specific board for them to purchase. Now the buying part isn't important, but the isea of being able to suggest a ski or sn

[Rails] Re: loading a partial via AJAX

2010-07-26 Thread rails.n...@gmail.com
Any ideas folks? On Jul 26, 10:32 pm, "rails.n...@gmail.com" wrote: > Hi > > I accept that partials are not intended to be exposed via a URL > > However I'd like to load my basic _form.html.erb partial for my model > to build basic AJAX form > > So one way to do this is to put something like this

[Rails] Re: Re: Re: Re: Problem with reading cgi cookie

2010-07-26 Thread Pål Bergström
Greg Donald wrote: > 2010/7/26 P�l Bergstr�m : > params is a type of hash, and Hash has merge. So you can add stuff to > the params before passing it to the model, something like: > > params.merge( :my_cookie => cookies[:my_cookie] ) That I know. I was hoping to do something similar to what I

Re: [Rails] Re: Re: Re: Problem with reading cgi cookie

2010-07-26 Thread Greg Donald
2010/7/26 Pål Bergström : > Sorry but I don't understand you. And I have a feeling you don't > understand me. > > Let me ask you this instead; is there a way to get the value of a cookie > in a model? That breaks encapsulation. The model should never care what your cookies are doing. Only contro

[Rails] Re: Re: Re: Problem with reading cgi cookie

2010-07-26 Thread Pål Bergström
Robert Walker wrote: > Pål Bergström wrote: > I though I had made that clear. You read the cookie value as shown in > above index method of the controller then you pass that value to the > model object. > > If you don't know how to pass a variable to a method, then I'd suggest > learning somet

[Rails] Re: dynamic image

2010-07-26 Thread Marnen Laibow-Koser
Remco Swoany wrote: > Hi, > > I am developing a t-shirt shop. The feature i want to develop is a form > where visitors can fill in there name and "on the fly" the name is > printed on the t-shirt(image). > > Has someone what is the best practice to do this? Imagemagick, > Javascript? > I'd pro

[Rails] Re: Re: Re: Problem with reading cgi cookie

2010-07-26 Thread Robert Walker
Pål Bergström wrote: >> def index >> @users = User.all >> @cookie_count = cookies.size >> @user_name_cookie = cookies[:user_name] if @cookie_count > 0 >> >> >> end > I don't want to set a cookie. That's never been a problem. I would like > to read a cookie and get

[Rails] Glasgow Technology Network - Rails Meetup on 01-Sep-2010

2010-07-26 Thread Ashish Kulkarni
Dear all, We are having a presentation on Ruby on Rails on 01-Sep-2010 - http://www.glasgowtechnet.com/calendar/14220029/ At Glasgow Technology Network we are committed to having regular events on leading edge and bleeding edge technologies. If you are in Glasgow and are interested to a

[Rails] dynamic image

2010-07-26 Thread Remco Swoany
Hi, I am developing a t-shirt shop. The feature i want to develop is a form where visitors can fill in there name and "on the fly" the name is printed on the t-shirt(image). Has someone what is the best practice to do this? Imagemagick, Javascript? Grt..remco -- Posted via http://www.ruby-foru

[Rails] Re: Changing the model_path.

2010-07-26 Thread Joe
Bump?! Please Help, Thanks In Advance, Joe On Jul 26, 7:29 am, Joe wrote: > Hi, > > I'm new to RoR, but currently need to make some changes to my site to > implement permalinks. > Whenever I do a link, I use: category_path(category) and then the > to_param permalinks it. The previous piece of

[Rails] Re: fail rollback transaction with manual raise exception

2010-07-26 Thread Carlos Forero
I'm sorry. The problem was the following code that another developer had added: class ApplicationController < ActionController::Base prepend_around_filter :action_transaction def action_transaction ActiveRecord::Base.transaction do yield end end end thanks anyway -- You re

[Rails] Re: Re: Re: Problem with reading cgi cookie

2010-07-26 Thread Pål Bergström
Robert Walker wrote: > > def create > @user = User.new(params[:user]) > cookies[:user_name] = "david" > > > end > > Sets a :user_name cookie with value "david" upon creating a user > > > def index > @users = User.all > @cookie_count = cookies.size >

[Rails] Re: Re: Re: Problem with reading cgi cookie

2010-07-26 Thread Robert Walker
Pål Bergström wrote: > I still have problem. I just want to read a damn cookie. Why doesn't > this work? def create @user = User.new(params[:user]) cookies[:user_name] = "david" end Sets a :user_name cookie with value "david" upon creating a user def index @

[Rails] problem installing validation_reflection plugin

2010-07-26 Thread bill walton
Greetings, I'm having a problem installing the validation_reflection plugin that I've never seen before and wonder if anyone can give me a clue as to what might be going on. C:\InstantRails\rails_apps\register>ruby script/plugin -v install git://github.com/redinger/validation_reflection.git Plugi

[Rails] Re: how to generate jasper reports in rails

2010-07-26 Thread Ar Chron
kiran kumar wrote: > Hi all, > > > can anyone tell how to generate reports using jasper in rails > Sure... Google 'rails jasper report create' and you should see http://wiki.rubyonrails.org/rails/pages/howtointegratejasperreports as one of the options. From there it looks pretty reasonable.

[Rails] Re: Re: Re: Problem with reading cgi cookie

2010-07-26 Thread Pål Bergström
Pål Bergström wrote: > req = Rack::Request.new(env) > req.cookies() > I still have problem. I just want to read a damn cookie. Why doesn't this work? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"

[Rails] Re: How can I force require a file in the console?

2010-07-26 Thread Lux
Well Application Controller is a class, so I think you would want to do require "ApplicationController" If that does not work you can always just paste the methods in and call them. Kind of hacky but it works. On Jul 25, 7:44 pm, Charles Wang wrote: > I use rails-3.0.0.beta3 and ruby-1.9.2-previ

[Rails] Re: form date helper with text year

2010-07-26 Thread AppleII717
I'll answer my own question: <%= select_month @person.born,:prefix => :person ,:field_name => "born(2i)" %> <%= select_day @person.born,:prefix => :person , :field_name => "born(3i)" %> <%= text_field_tag "person[born(1i)]", value = @person.born.year,:size => 4 %> On Jul

[Rails] how to generate jasper reports in rails

2010-07-26 Thread kiran kumar
Hi all, can anyone tell how to generate reports using jasper in rails thanks and regards kiran -- 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...@googlegroups.com. To unsubscribe fro

[Rails] form date helper with text year

2010-07-26 Thread AppleII717
I have a date where the year range is more then I want to define in a select_date scaffold generated year range. My idea was to have the year entered as a text field and the month and day using something like: <%= select_month @person.born,:prefix => :person ,:field_name => "born(2i)" %> <%=

[Rails] Re: collection_select not being submitted database

2010-07-26 Thread Loic Regnault
Frederick Cheung wrote: > On Jul 26, 2:43�pm, Loic Regnault wrote: >> >> I mean the chosen crc on my collection. >> Exactly users have multiple crcs, this is why I used nested attribute >> with child_link to add crcs to users. (I hope I'm understandable ..) >> >> In fact crcs are already created a

Re: [Rails] Problem with named_scope using a count

2010-07-26 Thread Dave Aronson
On Sat, Jul 24, 2010 at 13:23, Greg Ma wrote: > I have two models, Post and Rate. You can rate each post with "good" or > "bad". > I would like to create a named_scope to get the best posts. > How can I do that? First you need to define "best". What is the overall rating for each post? Good mi

[Rails] Re: Re-usable template pattern - yield?

2010-07-26 Thread Max Williams
Frederick Cheung wrote: > On Jul 26, 1:55�pm, Max Williams wrote: >> >> This is so i can use the same pattern of "if the article's not there >> show nothing at all, unless the current user is an admin in which case >> show the 'missing article' message", but with arbitrary html wrapped >> around t

[Rails] Re: collection_select not being submitted database

2010-07-26 Thread Frederick Cheung
On Jul 26, 2:43 pm, Loic Regnault wrote: > > I mean the chosen crc on my collection. > Exactly users have multiple crcs, this is why I used nested attribute > with child_link to add crcs to users. (I hope I'm understandable ..) > > In fact crcs are already created and had a 'NULL' field on DB (use

[Rails] Re: Showing a string to user and saving an integer in the DB

2010-07-26 Thread Alfredo Bonilla
bungart1978 wrote: > Hi, > > maybe this helps: > http://guides.rubyonrails.org/form_helpers.html#making-select-boxes-with-ease > > Regards > Marc Thank you very much. It is was I was searching for. I use select_tag for entering the info (combos) and later a helper translation for showing the

[Rails] Re: collection_select not being submitted database

2010-07-26 Thread Loic Regnault
Frederick Cheung wrote: > On Jul 26, 2:18�pm, Loic Regnault wrote: >> � � � <% end %> >> >> and on "_crcatt.html.erb" I got: >> � � � � <%= �f.collection_select( :user_id, @crcs, :id, :name) %> >> >> how can I edit the choosen crc ? I'am a 'little' bit lost... I only got >> 4 month of rails experi

Re: [Rails] Destroy association in memory

2010-07-26 Thread Anatoliy Lysenko
Hi Everyone, Thanks for responses, I found what I need: http://rails.lighthouseapp.com/projects/8994/tickets/4521-habtm-ability-to-link-and-unlink-records-with-autosave-true Th

[Rails] Re: collection_select not being submitted database

2010-07-26 Thread Frederick Cheung
On Jul 26, 2:18 pm, Loic Regnault wrote: > Hi, > I understand the non-sense. I used fields_for and it's works but as you > say, I create a new crc when I want to edit one. > > I put a partial on my users views: > >       <% f.fields_for :crcs do |crc| %> >         >           <%= render :partial

[Rails] [ANN] Typo 5.5 for Rails 2.3.8

2010-07-26 Thread Frédéric de Villamil
Hello, On July 22th, 2010, Typo version 5.5 named for famous photographer Richard Avedon was released to the public. Coming with a new admin and setup, Typo 5.5 runs on Rails 2.3.8. Being around since March 2005, Typo is (probably) the oldest blogging platform in Rails. It has a full set of featu

[Rails] Re: Re-usable template pattern - yield?

2010-07-26 Thread Frederick Cheung
On Jul 26, 1:55 pm, Max Williams wrote: > > This is so i can use the same pattern of "if the article's not there > show nothing at all, unless the current user is an admin in which case > show the 'missing article' message", but with arbitrary html wrapped > around the actual article (in this ca

[Rails] Re: collection_select not being submitted database

2010-07-26 Thread Loic Regnault
Frederick Cheung wrote: � � � > > That's not going to put parameters in the form expected by > accepts_nested_attributes_for (the easiest way to do that is to use > fields_for). You're also not submitting name or place attributes for > crc so the crc wouldn't able to be saved anyway. Last of all

[Rails] No more @controller.expects in Test::Unit?

2010-07-26 Thread Fernando Perez
Hi, In my functional tests it was convenient to use: @controller.expects(:admin?).at_least_once.returns(true) to simulate requests which come from an admin user. But it seems that in Rails 2.3.8 it's gone away. What replaces it now? Thanks -- Posted via http://www.ruby-forum.com/. -- You re

[Rails] Re-usable template pattern - yield?

2010-07-26 Thread Max Williams
Hi all. I have something that's like a helper and like a partial but not quite either. Instead of typing this: <% if (page = ComatosePage.find_by_path("general/explore")) || current_user.admin? %> <%= page ? page.to_html : "Comatose article 'general/explore' not found" %>

[Rails] Re: Showing a string to user and saving an integer in the DB

2010-07-26 Thread bungart1978
Hi, maybe this helps: http://guides.rubyonrails.org/form_helpers.html#making-select-boxes-with-ease Regards Marc On 26 Jul., 13:07, Alfredo Bonilla wrote: > Hi, > > I would like to know the best practice for following situation: > > * For saving DB space, instead of saving a list of string val

[Rails] Auto_complete – create association to anot her model – handle foreign-keys - validation

2010-07-26 Thread bungart1978
Hello, In the app that I’m currently developing I want to use the auto_complete plugin to create an association from the model “ticket” to the model “customer”. In the new ticket form I created the field “customer name” as an auto_complete field. The controller handles the lookup on the name field

[Rails] Re: collection_select not being submitted database

2010-07-26 Thread Frederick Cheung
On Jul 26, 11:48 am, Loic Regnault wrote: > Hi everybody, > I apologize for my student's english. > > I got some problem with my Rails app, i got a collection_select who > aren't submited & save in my database. After 2 days googling and didn't > find anything helpful i'am asking your help. > > I

[Rails] loading a partial via AJAX

2010-07-26 Thread rails.n...@gmail.com
Hi I accept that partials are not intended to be exposed via a URL However I'd like to load my basic _form.html.erb partial for my model to build basic AJAX form So one way to do this is to put something like this in the controller: def basic_form render :partial=>"form" end .. but..

[Rails] Re: Geneaology Tree

2010-07-26 Thread Marnen Laibow-Koser
Mamadou Touré wrote: > Hi Folks, > I want to develop a Geneaology tree application for my family, but I'm > just wondering if there is an easy way to represent the tree (branches > etc...) in html. ? Suggestion for a tool tec... Besides the Google tree API (which I'll have to check out), you might

[Rails] Showing a string to user and saving an integer in the DB

2010-07-26 Thread Alfredo Bonilla
Hi, I would like to know the best practice for following situation: * For saving DB space, instead of saving a list of string values ("Implemented", "Non Implemented", "Partially Implemented"), I want to save an integer value (1, ,2, 3) * My doubt is how to manage this situation in terms of: >

[Rails] collection_select not being submitted database

2010-07-26 Thread Loic Regnault
Hi everybody, I apologize for my student's english. I got some problem with my Rails app, i got a collection_select who aren't submited & save in my database. After 2 days googling and didn't find anything helpful i'am asking your help. I had two tables: Crc and User: (I removed useless relation

[Rails] seaches with ajax......

2010-07-26 Thread mauro
I have problems using ajax in a search field. In view/layouts I have main.html.erb with code: http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> http://www.w3.org/1999/xhtml"; xml:lang="it" lang="it"> Consegna sacchetti <%= stylesheet_link_tag 'scaffold' %> <%= javascript_include_tag :defa

[Rails] Voting functionality like in YouTube

2010-07-26 Thread Ainar Abramovich
magine that you've created simple weblog by scaffolding and you want to add 'Vote Up' and 'Vote Down' (or 'like' 'dislike') functionality just like in YouTube, what steps are required, or someone have done it before or anyone could give me helpful links to some posts where is described how-to? Than

[Rails] Testing alias of link_to on Rails 1.2.6

2010-07-26 Thread John Smith
I'm trying to write a test for an alias of link_to on Rails 1.2.6, but it's always loading: vendor/gems/ruby/1.8/gems/actionpack-1.13.6/lib/action_view/helpers/url_helper.rb:67 instead of my version, written in a plugin. Any ideas? -- Posted via http://www.ruby-forum.com/. -- You received this

[Rails] Re: need help installing Rails 3 on non-Intel Mac

2010-07-26 Thread AppleII717
"MacPorts is the Devil" About a month ago I succeeded in getting rails3 working on a G4 MacMini after upgrading to 10.5.8 from 10.4.?. There where problems and most of them revolved around MacPorts. I installed rubygems using MacPorts and dependencies w

[Rails] Re: Rake is not working

2010-07-26 Thread senthilkumar
Hi Dave now i am getting error like this ActiveRecord::StatementInvalid in SiteController#index Mysql::Error: Table 'shellcrp_development.helps' doesn't exist: SELECT * FROM `helps` RAILS_ROOT: C:/Documents and Settings/senthilkumar.m/Desktop/chessapi/ crp Application Trace | Framework Trace

[Rails] Re: Rails 3 RC

2010-07-26 Thread Michael Schuerig
On Monday 26 July 2010, Ryan Bigg wrote: > Michael Schuerig wrote: > > On Monday 26 July 2010, Ryan Bigg wrote: > >> As for the people who aren't good for this community, I so far see > >> two of them in this entire thread and let me tell you: they aren't > >> the people who are whining that Rails