Displaying 13 results from an estimated 13 matches for "peterbattaglia".
2008 Nov 30
6
ActionController::InvalidAuthenticityToken?
Hi-
I am trying to use AJAX calls to login and logout of my Rails app so
that the form renders in the side bar when you are not logged in, and
your "profile" renders if you are.
It all works, but when you logout, and try and log back in, you get
"ActionController::InvalidAuthenticityToken", in the development.log.
What does this mean, I can''t figure out how to fix
2008 Feb 19
3
will_paginate question
Hi-
Is it possible to use search parameters with will_paginate?
For example, something like this:
@var = Model.paginate :per_page => 20, :page => params[:page],
:order => ''my_date DESC'', :conditions
=>["my_date >= ? AND my_date <=?",@start,@end]
I am getting some errors with this, but will this generally work?
2008 Jan 29
0
Rails Config/Environment.rb
Is the environment.rb file where you would put your ''require''
statements? Like what I have below?
Thanks!
...
# Include your application configuration below
require ''some lib''
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this
2008 Feb 04
0
Scruffy Bar Chart Question
Hi-
I have been using Scruffy for a couple days and it''s worked out really
well. I am stuck though getting a bar chart to work with a single
line.
Here''s what I am doing:
general chart stuff..graph.new...etc
...
my_graph.add(:bar, ''GOAL'', [250,350])
my_graph.add(:bar, ''ACTUAL'', [150,200])
This works, but what I was is a SINGLE Bar with one
2008 Feb 29
1
Scruffy Stacked Bar Chart
Hi-
Trying to do a stacked bar chart, but nothing is rendering when I add
more then 1 bar:
This works:
graph = Scruffy::Graph.new(:title => "My Chart")
graph.add :stacked do |stack|
stack.add(:bar, ''Stack1'', [10,10])
end
This doesn''t:
graph = Scruffy::Graph.new(:title => "My Chart")
graph.add :stacked
2008 Nov 28
0
Paperclip Plugin - Routing Error?
Hi-
I am using the plugin "paperclip", this is my second time using it,
the first time, I had no
issues...
This time, I added paperclip onto my model, no issues until I tried to
render the images I uploaded. I see this in the development.log:
ActionController::RoutingError (No route matches "/avatars/2/original/
DSCN2149.JPG" with {:method=>:get}):
I didn''t
2011 Jul 01
0
config.cache_store file path ignored?
Hi-
I have enabled caching in my application and am using the :file_store
option, as shown below (enabled in each environment).
config.cache_store = :file_store, "#{Rails.root}/public/cache"
Why is it that the file path I set is ignored? Everything seems to
get dumped out to /public, by default.
Thanks!
--
You received this message because you are subscribed to the Google Groups
2008 Feb 04
3
MySQL Help?
Hi-
I posted this under the MySQL group as well, but I thought some other
Rails folks may have seen this before??
"Mysql::Error: Can''t create/write to file ''/var/lib/mysql/
#sql_146a_0.MYI'' (Errcode: 30)"
Anyone know what this means, and how to fix it?
Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are
2008 Feb 12
3
send_file - PDF
Hi-
I''d like to load a PDF file into a page, in my controller:
send_file "/path to/my.pdf", :disposition => "inline"
However, instead of rendering inline, it asks to download the file.
How can I display the contents without downloading?
Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
2008 Mar 21
5
foreign key question
Hi-
Say I have a db with following schema:
MyTable:
Id, name, user_id, date
User:
id, name, description
I know that I want to add "belongs_to" in my "user" model but how can
I enforce a proper constraint on the user_id in "MyTable"? Is this
done using a has_one in the "MyTable" model?
Thanks!
--~--~---------~--~----~------------~-------~--~----~
You
2008 Mar 06
4
Active Record Question
Hi-
Say I am returning some collection of DateTime items and I only want
to compare the month. Is there a way to do this directly in the find?
Something like this...
@coll = Collection.find(:all, :conditions => ["date.month
= ?",Time.now.lat_month])
Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
2007 Dec 12
3
datetime_select and Active Record
If I have a form similar to the one below, and ''start'' is a "string"
field in my Database. Is there a way to take all of the date/time
params and put them into ''start'' without too much hacking? I would
like this to be as clean as possible.
<p><label for="start_time">Start Time</label><br/>
<%=
2008 Feb 01
5
ActiveRecord - find
Hi-
What I would like to do is select a single column out of my model, say
the column is called my_column, and store the result in an array,
which it should be, right?
For example, if I do:
@my_arr = Model.find(:all, :select => "my_column")
This should fill @my_arr with all the values from "my_column", right?
So then I can access the data by some_other_variable =