i get this error
https://gist.github.com/1305417
--
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-talk@googlegroups.com.
To unsubscribe from this
RoR is for building web app, for smartphones app you should learn java i
think. But any web app build with RoR will work on a smartphone using
the internet browser.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on
i dont need the cookie for the current user, but for every user. So a
user can see if someone else is connected or not
--
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, sen
if cookies is permanent i cant verify if signed in is true or false
--
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-talk@googlegroups.com.
To uns
how could I get if a user if connected or not?
--
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-talk@googlegroups.com.
To unsubscribe from this gr
inside gemfile
gem 'sqlite3', :group => [:development, :test]
gem 'pg', :group => [:production]
--
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-
i have some questions about sessions store, actually im using cookie
based authentication. But i need a way to know if someone is logged in
or not, so that's why i need DB store sessions, but my question is, is
the a way of making this sessions expire like cookies, or beeing
permanent as cookies? i
how does force_ssl inside a controller works, it just work for the
current controller actions? becouse I place force_ssl inside my sessions
controller and everytime I access to any action of it I start navigating
throw https on my whole page not only inside sessions controller.
--
Posted via http
if using Rails 3.1 add
gem 'pg', :group => :production
gem 'pg', :group => [:development, :test]
into gemfile
--
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
So I have this
Event
has_many :assistance
has_many :users, :through => :assistance
User
has_many :assistance
has_many :assisted_events, :through => :assistance, :source =>
:assistance
Assistance
belongs_to :user
belongs_to :event
Users assisting to events are assigned using
@event.
so its a problem with arel 2.1.5, thanks for the tip
--
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-talk@googlegroups.com.
To unsubscribe from t
i updated from RC4 to RC5 (3.1) and everytime I do
SomeModel.all, .first, anything I get something like this
ActionView::Template::Error (undefined method `visitor' for
#):
PostgreSQLAdapter or SQLiteAdapter
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you ar
I found the problem, a jquery plugin isnt loading well.
Uncaught TypeError: undefined is not a function
but it was working after rails 3.1, is beeing loaded at the end of the
file so it should be ok
(bubblepopup plugin)
--
Posted via http://www.ruby-forum.com/.
--
You received this message
Peter De Berdt wrote in post #1012552:
> On 23 Jul 2011, at 08:01, Martin Wawrusch wrote:
>
>> Try
>>
>> $ ->
>> $('#events a').lightBox()
>> $("#slider").easySlider
>> auto: true
>> continuous: true
>>
>> There is an online js to coffeescript converter out there, I just
>> can't fi
I convert my old JS files into CoffeeScript, In my public controller I
used this functions
$('#events a').lightBox()
$(document).ready ->
$("#slider").easySlider
auto: true,
continuous: true
they load inside application.js like this
(function() {
$('#events a').lightBox();
$(docu
Tim Shaffer wrote in post #1012223:
> Assigning it in the controller is probably the best bet:
>
> instance = Model.new(params[:model])
> instance.ip_address = request.ip_address
I will do it then, thanks
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are su
so how should I add the IP? assign it on the controller or maybe a
hidden text field?
--
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-talk@googl
i tried to make a callback to assign the user IP address on create
before_create
self.ip = request.remote_ip
end
but I get
NameError (undefined local variable or method `request' for
#):
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the
so before trying ajax i need to learn javascript right?
--
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-talk@googlegroups.com.
To unsubscribe fro
I'm trying to work with AJAX on Rails 3 but I cant find any
documentation or a guide for learning it, is there a good one out there
to start practicing?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk"
thanks you guy rubygems 1.8.2 runs just perfect
sudo gem update --system 1.8.2
--
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-talk@googlegroups
I Just installed ruby 1.8.7, rubygems 1.8.3 i think and Rails 3.0.7 and
I get this messages everywhere
tomas$ rails s
NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It
will be removed on or after 2011-10-01.
Gem::Specification#has_rdoc= called from
/opt/local/lib/ruby/gems/
Fixed: Changed @user.build_profile from view to controller
--
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-talk@googlegroups.com.
To unsubscribe
I added that line but still dont work
User Form
<%= form_for @user do |f| %>
<%= render 'shared/error_messages', :record => @user %>
>>> Some Field Tags <<<
<%= f.fields_for @user.build_profile do |builder| %>
<%= render 'profile_form', :f => builder %>
<% end %>
<%= f.submit (@user
Im making nested attributes for profile on the user model and I also
need to validate the profile info
so I put
User model
has_one :profile
accepts_nested_attributes_for :profile
validates_associated :profile <--- To validate values
attr_accessible :profile
Ok I get it now.
--
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-talk@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrail
what if someone set article_id = 100
and article with id 100 doesnt exists
--
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-talk@googlegro
Tim Shaffer wrote in post #998504:
> You're right.
>
> How do you determine that a user has access to add a comment to a
> specific
> article? That's the logic that you should put in you controller/model.
>
> So if the user changes the article ID in the URL to an article that he
> doesn't have acce
using a hidde_field shows the value to the user through source code
and using GET can make users change the value from the URL
--
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 gro
Which is the best way of doing this
I have an Article show page with a post form so when submitting the post
I give the article_id argument to the post create method in a different
controller.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to
I have my articles migration
create_table :articles do |t|
t.integer :category_id, :null => false
etc..
and my form
Select a category
<%= f.select :category_id, Category.all.collect {|category|
[category.name, category.id ]} %>
But everytime im sending that info im getting a nil value for
categ
I just install rails for Ruby 1.9.2 running from Ubuntu 11.04
but everytime i try to Rails S or bundle install I get
NOTE: Gem::SourceIndex#all_gems is deprecated with no replacement. It
will be removed on or after 2011-10-01.
Gem::SourceIndex#all_gems called from
/usr/local/lib/ruby/gems/1.9.1/g
How can I use a
User has_many Users?
my model is called Friends user_id friend_id
so a User can add a User as a friend
--
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
Im making a Cart for my site, so I make Orders Controller to manage
Orders
so inside I do
def add_product
@product = Product.find(params[:id])
@order = Order.find_by_client_id(current_user.id)
@order.products << @product
end
on Product view/show I place
<%= link_to t(:add_to_cart
so you say that should be form_for params[:key]? that wont work neither
--
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-talk@googlegroups.com.
To
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'
51 matches
Mail list logo