[Rails] Re: is equal operator to check current user is owner

2011-02-12 Thread Frederick Cheung
On Feb 12, 10:01 am, msaspence wrote: > > I'm using the Authlogic so have followed the instructions > herehttp://rdoc.info/github/binarylogic/authlogic/master/Authlogic/TestCase > Have you tried sticking some breakpoints in your code to see how current_user and @thing.owner differ? Fred --

[Rails] Re: link_to a action in the controlles is not called

2011-02-12 Thread Frederick Cheung
On Feb 12, 10:25 pm, Lorenzo Brito Morales wrote: > i have  a link where it has to call a method defin in todoscontroller > named say_when but show is called >       <%= link_to 'Say when', todo,  :action => :say_when , > :remote => true %> > The problem is that (by definition) this links to th

[Rails] Invitation to CodeFest - the international online coding festival of Computer Engineering Society, ITBHU

2011-02-12 Thread vishal kumar rai
Hello , We are delighted to inform you that *Codefest '11*, the *annual International online coding festival* of *Computer Engineering Society, IT-BHU*, has been unveiled. CodeFest is a unique fest wherein concepts of mathematics, logic, artificial intelligence, a

[Rails] CSRF Protection and Mobile Clients

2011-02-12 Thread pete
Hi- I'm working on a Rails app that exposes a simple web service and an accompanying mobile client. It appears that I am unable to POST data to the service with the CSRF protection in place. What is the best way to deal with this from mobile clients? Should I embed the authenticity token as par

[Rails] Re: GemFile error + General Help?

2011-02-12 Thread Jake Byman
I have run bundle install, and that runs fine. The 'rake db:create' command also produces the same error. To peter, if you had seen the attached GemFile, it does say additionally that part as one of the gems. Apologies for not initially writing it. -- Posted via http://www.ruby-forum.com/. --

Re: [Rails] Re: link_to a action in the controlles is not called

2011-02-12 Thread Lorenzo Brito Morales
i already added resources :todos do member do get 'say_when' end end now its printDELETE /tiptags/:id(.:format) {:action=>"destroy", :controller=>"tiptags"} say_when_todo GET/todos/:id/say_when(.:format) {:action=>"say_when", :controller=>"todos"}

Re: [Rails] Re: link_to a action in the controlles is not called

2011-02-12 Thread Lorenzo Brito Morales
is not, how i do that ? todos GET/todos(.:format) {:action=>"index", :controller=>"todos"} POST /todos(.:format) {:action=>"create", :controller=>"todos"} new_todo GET/todos/new(.:format) {:action=>"new", :controller=>"todos"} edit_todo GET/todos/:id/ed

[Rails] link_to a action in the controlles is not called

2011-02-12 Thread Lorenzo Brito Morales
i have a link where it has to call a method defin in todoscontroller named say_when but show is called <%= link_to 'Say when', todo, :action => :say_when , :remote => true %> class TodosController < ApplicationController # GET /todos # GET /todos.xml def index @todos = Todo.all

[Rails] Re: link_to a action in the controlles is not called

2011-02-12 Thread bourne
Did you define it in your routes.rb? What is the output of rake routes? -- 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

Re: [Rails] GemFile error + General Help?

2011-02-12 Thread Peter Bell
Let me qualify the fact that I am still getting up to speed with bundler, so take this advice with a grain of salt. I don't know if this is still necessary, but in my Gemfile I have: gem 'sqlite3-ruby', :require => 'sqlite3' So the gem I'm using is sqlite3-ruby but the library is sqlite3. If j

Re: [Rails] GemFile error + General Help?

2011-02-12 Thread Colin Law
On 12 February 2011 21:10, Jake Byman wrote: > Hello, > > I'm a complete beginner in Ruby on Rails, so excuse me if this is a > ridiculous question. Just to bare in mind, I'm using Mac OSX (Snow > Leopard), Rails 3, and sqlite3 as a database. I've checked, and > everything is up to date (Rails, Ru

[Rails] GemFile error + General Help?

2011-02-12 Thread Jake Byman
Hello, I'm a complete beginner in Ruby on Rails, so excuse me if this is a ridiculous question. Just to bare in mind, I'm using Mac OSX (Snow Leopard), Rails 3, and sqlite3 as a database. I've checked, and everything is up to date (Rails, Ruby, Gems). I am simply creating a test application, and I

[Rails] Re: Rails 3 route problem

2011-02-12 Thread Dave Kimura
I think that I am experiencing the same issue. My background on Rails is fairly limited, but since upgrading to Rails 3.0.4, I've had issues testing my controller on live server. Webrick works fine, but when I test my application on my server, it gives me the 404 HTML Error. I'm using a test-liv

[Rails] Re: sqlite3/sqlite3_native (LoadError)

2011-02-12 Thread Andi Geheim
Guillaume N. wrote in post #977959: > For me, I had to download and move the > sqlite3.exe > sqlite3.dll > > into a folder in my path, like C:/Windows or for me c:/Ruby 1.9.2/bin/ > > Hope that helps Thanks! Downloaden the to files and putting them in the bin folder solved my problem, too. http:

Re: [Rails] Rails 3 route problem

2011-02-12 Thread João Pereira
Yeah, I was only allowing POST and GET on that route, Rails was looking for a PUT because the object user was not new. Thanks On Thu, Feb 10, 2011 at 12:28 AM, Jim Ruther Nill wrote: > since the routes match exactly, I think the problem is in the method.  I > haven't used simple_form yet so I do

Re: [Rails] Application not running on Rails 2.3.8 and Ruby 1.8.6

2011-02-12 Thread Colin Law
On 12 February 2011 11:17, Salil Gaikwad wrote: > Hi All, > > I have upgrade my Rails to 2.3.8 and Ruby to 1.8.6. I have managed to > start my existing application but when I am clicking on any link on the > page, it give me error "stack level too deep" with following stacktrace: > > /usr/lib/ruby

Re: [Rails] Re: An hash of arrays, how to use?

2011-02-12 Thread Norbert Melzer
2011/2/12 Frederick Cheung : > > > On Feb 12, 12:47 am, Norbert Melzer wrote: >> 2011/2/11 Frederick Cheung : >>       h["data"][0]["bank"][0]["item"].each do |item| >>         if b.key? item["cat"] >>           b[item["cat"]] = item >>         else >>           b[item["cat"]] << item > > You're

[Rails] Application not running on Rails 2.3.8 and Ruby 1.8.6

2011-02-12 Thread Salil Gaikwad
Hi All, I have upgrade my Rails to 2.3.8 and Ruby to 1.8.6. I have managed to start my existing application but when I am clicking on any link on the page, it give me error "stack level too deep" with following stacktrace: /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/buffere

[Rails] Re: is equal operator to check current user is owner

2011-02-12 Thread msaspence
On Feb 12, 10:11 am, Colin Law wrote: > On 12 February 2011 10:00, msaspence wrote: > > > On Feb 12, 9:53 am, Colin Law wrote: > >> On 11 February 2011 22:40, msaspence wrote: > > >> > I'm want to restrict access to an object show action to the owner > > >> > in my action I have this > > >>

[Rails] Re: is equal operator to check current user is owner

2011-02-12 Thread msaspence
On Feb 12, 10:11 am, Colin Law wrote: > On 12 February 2011 10:00, msaspence wrote: > > > > > > > > > > > On Feb 12, 9:53 am, Colin Law wrote: > >> On 11 February 2011 22:40, msaspence wrote: > > >> > I'm want to restrict access to an object show action to the owner > > >> > in my action I ha

[Rails] Interactive diagram

2011-02-12 Thread Danielle Bosonnet
Hi Guys, I quite a newbie to rails, and was wondering what would be the best way to implement an interactive diagram of the body as i am developing a fitness application. Thinking about using flash or is there an easier way? thanks in advance -- You received this message because you are subscri

Re: [Rails] Re: is equal operator to check current user is owner

2011-02-12 Thread Colin Law
On 12 February 2011 10:00, msaspence wrote: > On Feb 12, 9:53 am, Colin Law wrote: >> On 11 February 2011 22:40, msaspence wrote: >> >> > I'm want to restrict access to an object show action to the owner >> >> > in my action I have this >> >> > def show >> >    @thing = Thing.find(params[:id]) >

[Rails] Re: is equal operator to check current user is owner

2011-02-12 Thread msaspence
On Feb 12, 9:21 am, Frederick Cheung wrote: > On Feb 11, 10:40 pm, msaspence wrote: > > > > > > > > > > > I'm want to restrict access to an object show action to the owner > > > in my action I have this > > > def show > >     @thing = Thing.find(params[:id]) > >     if current_user && @thing.ow

[Rails] Re: is equal operator to check current user is owner

2011-02-12 Thread msaspence
On Feb 12, 9:53 am, Colin Law wrote: > On 11 February 2011 22:40, msaspence wrote: > > > I'm want to restrict access to an object show action to the owner > > > in my action I have this > > > def show > >    @thing = Thing.find(params[:id]) > >    if current_user && @thing.owner == current_user >

Re: [Rails] is equal operator to check current user is owner

2011-02-12 Thread Colin Law
On 11 February 2011 22:40, msaspence wrote: > I'm want to restrict access to an object show action to the owner > > in my action I have this > > def show >    @thing = Thing.find(params[:id]) >    if current_user && @thing.owner == current_user Not related to your problem, but just pointing out t

[Rails] Re: is equal operator to check current user is owner

2011-02-12 Thread Frederick Cheung
On Feb 11, 10:40 pm, msaspence wrote: > I'm want to restrict access to an object show action to the owner > > in my action I have this > > def show >     @thing = Thing.find(params[:id]) >     if current_user && @thing.owner == current_user >       respond_to do |format| >         format.json  {

[Rails] Re: An hash of arrays, how to use?

2011-02-12 Thread Frederick Cheung
On Feb 12, 12:47 am, Norbert Melzer wrote: > 2011/2/11 Frederick Cheung : > > > > > On Feb 11, 9:09 pm, Norbert Melzer wrote: > >> Why is keys empty? > > > because you've never actually done x["test"]= ... > > (all you're doing is modifying the hash's default value) > > OK, now I tried the foll

[Rails] Re: Ruby on Rails - Tutorials

2011-02-12 Thread bourne
> To know Ruby on Rails right from the start you can visit > > http://www.univtutorials.com/ruby-on-rails/index.htm > This page seems to be a bit outdated... "Ruby on Rails 2.1 Tutorial This is the latest version of Rails. So if you are running this version of Ruby on Rails, then I would rec

[Rails] Ruby on Rails - Tutorials

2011-02-12 Thread Peter Jackson
Hi All It is good to learn ruby on rails as a techie. Since it provides much better options than other languages we can say it is one of the best one to know. To know Ruby on Rails right from the start you can visit http://www.univtutorials.com/ruby-on-rails/index.htm You could find all sorts o