[Rails] Problem with new action 'validate'

2011-04-17 Thread Jose tomas R.
I've created a new action in my invitations controller named validate and validation controller/invitations_controller.rb def validate end def validation @invitation = Invitation.find(params(:key)) if @invitation != nil redirect_to new_client_path, :notice => 'Codigo Aceptado' else fl

[Rails] Re: Re: Get a value from previous page

2011-01-06 Thread Jose tomas R.
Colin Law wrote in post #972821: > On 6 January 2011 14:25, Jose tomas R. wrote: > > Please quote the previous message and insert your comments at the > appropriate point, this makes it easier to follow the thread. > >> I dont need @order ar params I need it as a value > &

[Rails] Re: Get a value from previous page

2011-01-06 Thread Jose tomas R.
I dont need @order ar params I need it as a value -- 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 this

[Rails] Re: Get a value from previous page

2011-01-04 Thread Jose tomas R.
i need something like this index.html.erb <%= link_to 'cost', :action => 'search', :order => 'cost' %> cars_controller.rb def search @order = :order @cars = Car.paginate :page => params[:page], :order => @order respond_to do |format| format.html # index.html.erb format.x

[Rails] Re: Get a value from previous page

2011-01-04 Thread Jose tomas R.
what [b] [/b] :S -- 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 this group, send email to rubyonrail

[Rails] Re: Get a value from previous page

2011-01-03 Thread Jose tomas R.
i need something like this index.html.erb <%= link_to 'cost', :action => 'search', [b]:order[/b] => 'cost' %> cars_controller.rb def search @order = [b]:order[/b] @cars = Car.paginate :page => params[:page], :order => @order respond_to do |format| format.html # index.html.erb

[Rails] Get a value from previous page

2011-01-02 Thread Jose tomas R.
how could i get a value from previus page? for example on EVENT show view i have <%= link_to 'New Message', new_message_path( :event_id => @event.id) %> | and i need to get the event id on the new_message page to send it when creating the message -- Posted via http://www.ruby-forum.com/. --

[Rails] Re: Problem with Command Prompt

2010-12-16 Thread Jose tomas R.
sorry didnt know why it didnt work earlier 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 this

[Rails] Problem with Command Prompt

2010-12-16 Thread Jose tomas R.
Im running ROR on my laptop, but i also work on my desktop pc, so i decide to move my proyect to a USB flashdrive, but when im trying to cd my E:\ drive i cant do it, im running windows XP on both. is there a command to change drive or is this not possible? -- Posted via http://www.ruby-forum.com

[Rails] Re: Re: Troubles getting :id

2010-11-21 Thread Jose tomas R.
Colin Law wrote in post #962926: > On 21 November 2010 13:01, Jose tomas R. wrote: >> wow, that was easy to fix. it's ".id" cause i need just the product ID >> thanks for your help and advice > > Please quote previous message when replying, it makes it easie

[Rails] Re: syntax error

2010-11-21 Thread Jose tomas R.
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 this group, send email to rubyonrails-talk+uns

[Rails] Re: syntax error

2010-11-21 Thread Jose tomas R.
i put it like a helper on AplicationController but still doesnt work -- 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 un

[Rails] Re: Troubles getting :id

2010-11-21 Thread Jose tomas R.
wow, that was easy to fix. it's ".id" cause i need just the product ID thanks for your help and advice -- 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 rubyon

[Rails] Troubles getting :id

2010-11-20 Thread Jose tomas R.
im using <%= button_to 'Rent', :controller => 'transaction' , :action => 'rent', :id => @product.id %> on ProductsController to pass an :id to a TransactionController but when searching for the product's id def load_product @product = Product.find(:id).id end i get Couldn't find Product

[Rails] Re: syntax error

2010-11-20 Thread Jose tomas R.
i notice, thanks i use that line too mucho on my code so i made on ApplicationControlller def privilege (session[:user_id].exist? && session[:user_id].privilege == 50) ? true : false end and on the actual page i put <%= :privilege ? link_to('Edit', edit_product_path(product)) : "" %>

[Rails] syntax error, unexpected tSTRING_BEG

2010-11-20 Thread Jose tomas R.
Rails is throwing this error C:/Ruby/Depot/app/views/products/index.html.erb:28: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '(' ...er.privilege == 50 ? {link_to 'Show', product} : 'a' );@out... in line <%= current_user.privilege == 50 ? {link_to 'Show', product} : 'a'