similar to: Rails noob confusion - HTML Form Post to Rails Controller?

Displaying 20 results from an estimated 3000 matches similar to: "Rails noob confusion - HTML Form Post to Rails Controller?"

2009 Jun 09
3
protect_from_forgery doesnt protect from forgery
Maybe I am grasping the full usage of this protect_from_forgery function, but it does not seem to work for me. Imagine the following: A simple website with a user that needs to log in to do certain stuff and a closed off admin section that only certain users can access that have the is_admin field set to true. So to be clear, my User model has a login, password and is_admin. When displaying the
2010 Sep 23
1
undefined method `protect_against_forgery?' for #<ActionView
Hi guys This is a pretty tricky one. I get a "undefined method `protect_against_forgery?'' for #<ActionView::Base:0x569a3d4>" error when trying to generate a partial from ''outside'' the web site. I do this as I have a rake task that checks for changes periodically in the background, and if it then sees a change it rebuilds the partial and posts the result
2008 May 07
2
Question on authenticity tokens
Does anyone find them useful? I can see them being good in some cases, but I have many exceptions that occur because of expired sessions. I am also not sure if they are really required for pages that require a login to access. The other place that they cause issues is in javascript requests. I am not using the built-in helpers, and all the javascript exists in separate js files. There is ways
2007 Dec 23
3
InvalidAuthenticityToken problems with my login form
I am trying to convert my codeand to use the new Rails 2.0 feature RequestForgeryProtection but I get an InvalidAuthenticityToken error, right from the beginning with my login form.. I followed the recommandations : in my environment.rb config.action_controller.session = { :session_key => ''myappname'', :secret =>
2009 Oct 09
1
protect_from_forgery development mode
Should this be working in development mode? For some reason it doesn''t. regards, John
2009 Jun 22
2
protect_from_forgery with db-session (Rails 2.3.2)
I try to use db-session with protect_from_forgery. But I always get a error msg: ActionController::InvalidAuthenticityToken. application_controller.rb protect_from_forgery #:secret => ''top_secret'' session_store.rb ActionController::Base.session_store = :active_record_store hope you can help me. Best regards -- Posted via http://www.ruby-forum.com/.
2010 Feb 22
10
Error: "ActionController::InvalidAuthenticityToken"
Hi there, I have my first Rails app running and I regularly get the following "logged_exception" error message: "ActionController::InvalidAuthenticityToken" Has anybody an idea what might cause this problem? Could it somehow be a "time out" error (like an "AuthenticityToken" which might expire after a certain time, or something along those lines)? Any
2008 Mar 19
7
Upgrade to 2.0.2: InvalidAuthenticityToken error on 1st POST
All, I''ve upgraded to 2.0.2, and I can''t get my login screen (the first POST request in the application) to work. When I post this form, I see the "InvalidAuthenticityToken" error. I have protect_from_forgery :secret => ''my_secret'' set in application.rb and I am using an active_record session store based on this line in environment.rb:
2010 Sep 19
4
Rails 2.3.8 - InvalidAuthenticityToken problem. URGENT!
I used to have Simple Captcha installed, but since I removed it I got all kinds of problems with login. Processing UsersController#login (for 188.177.122.179 at 2010-09-19 12:21:09) [POST] Parameters: {"commit"=>"OK", "authenticity_token"=>"/ Y0aZETCsMhyI3CkrZJK6O2NaLEoi+LRe8ZuDPWU9kc=",
2010 Aug 25
4
degree C symbol in a function
Hello help, I have changed around some graphing code and made it into a function. Previously they y label of the axis was inserted as text in its own layout box. text(1,1, expression(~degree~C),cex=1) This worked great and resulted in the symbol for degree. In the function, I have changed it so: text(1,1,paste(b_unit),cex=1) and b_unit<-expression(~degree~C) This now inserts ~degree~C
2012 Jun 07
3
conditional statement to replace values in dataframe with NA
Hello and thanks for helping. #some data L3 <- LETTERS[1:3] dat1 <- data.frame(cbind(x=1, y=rep(1:3,2), fac=sample(L3, 6, replace=TRUE))) #When x==1 and y==1 I want to replace the 1 values with NA #I can select the rows I want: dat2<-subset(dat1,x==1 & y==1) #replace the 1 with NA dat2$x<-rep(NA,nrow(dat2) dat2$y<-rep(NA,nrow(dat2) #select the other rows and rbind
2010 Feb 09
4
Rails3 pre and protect_from_forgery
I''ve almost entirely converted a rails 2.3.5 app to 3pre. I''m having some trouble with protect_from_forgery. I had protect_from_forgery set in application_controller.rb, but run some uploadify ajax stuff in one of my controllers, where I had protect_from_forgery, :except => :add_file set. In rails 3 I''m getting ActionController::InvalidAuthenticityToken on the ajax
2010 Oct 26
4
divide column in a dataframe based on a character
Hello, If I have a dataframe: example(data.frame) zz<-c("aa_bb","bb_cc","cc_dd","dd_ee","ee_ff","ff_gg","gg_hh","ii_jj","jj_kk","kk_ll") ddd <- cbind(dd, group = zz) and I want to divide the column named group by the "_", how would I do this? so instead of the first row being x
2008 Mar 15
3
[HELP]No :secret given to the #protect_from_forgery call
I am starting to BDD. When specing the controller I want to test for object creation: it "deberia crear una nueva persona en post create" do Usuario.should_receive(:create).with({:nombre => "camilo", :clave => "secreta", :tipo => "administrador"}).and_return(@usuario) post ''create'', {:usuario => {:nombre =>
2010 May 18
1
issues with R Library on a Server
Hello, I am a bit over my head on this issue. My colleagues and I are running R off of our server. We all have admin rights and prior to yesterday we all had our own libraries. Our main system administrator advised us that we should have a shared library. So, I am trying to do this. I have downloaded the latest version of R and installed it on the main drive of our server in the "Program
2011 Jan 27
2
identifying when one element of a row has a positive number
Hello, I am not sure where to begin with this problem or what to search for in r-help. I just don't know what to call this. If I have 5 columns, the first 2 are the x,y, locations and the last three are variables about those locations. x<-seq(1860,1950,by=10) y<-seq(-290,-200,by=10) ANN<-c(3,0,0,0,1,0,1,1,0,0) CTA<-c(0,1,0,0,0,0,1,0,0,2) GLM<-c(0,0,2,0,0,0,0,1,0,0)
2013 Jul 23
2
downloading web content
Hello, I am trying to use R to download a bunch of .csv files such as: http://biocache.ala.org.au/ws/occurrences/download?q=Banksia+ericifolia I have tried the following and neither work: a<- getURL(" http://biocache.ala.org.au/ws/occurrences/download?q=Banksia+ericifolia") Error in curlPerform(curl = curl, .opts = opts, .encoding = .encoding) : embedded nul in string: and
2010 Apr 19
2
selecting rows based on number that occurs after letter
Hello, I am trying to cycle through a csv and make some summary statistics. I need to select rows based on the number in the row name that comes after the letter 'y'. For example, ? BA1y1 would equal 1, ?C3A2r3y1 would equal 1 and ?MA3r3y1r3 would equal 1. I currently have my code ?cycling through by the 5th character but my rows have variable length and the y can occur in several
2009 Aug 19
2
Create! Syntax
Hey All, Two questions. Firstly, what is the difference between create and create! I see that create is document in the api http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M002269 What is the difference between the two of these functions and where is the create! function defined. Also, What are the differences between these two calls? a) SomeModel.create!{ :property_a =>
2008 Sep 06
4
Is Rails 2.1 "protect_from_forgery" == csrf_killer plugin?
Just would like to verify: Is protect_from_forgery (in Rails 2.1) == the csrf_killer plugin from Rick Olson? Thanks, Wes -- 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