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
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
>
&
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
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
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
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
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/.
--
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
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
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
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
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
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
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
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 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'
16 matches
Mail list logo