i am interested in the answer to this as well.
please post if you find out.
--
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
That helped but didn't completely solve my problem (but it saved
plenty of time so thanks!)
If you're running Rails pre 2.3, you'll have to change :key to
:session_key in your ckeditor_helper.rb file.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Ra
I think that I have the speed issue resolved. It appears to be an
anomaly that is associated only with their sandbox server. The live
server seems to work just fine. I can live with that. Thanks for
your help.
... doug
--
You received this message because you are subscribed to the
Hello all,
I am working on Rails 3, and I would like to return a forbidden error
message from a controller.
I had trying something like that:
def my_action
respond_to do |format|
format.html { redirect_to(login_path, :warning =>
I18n.t('.forbidden'), :status => :forbidden) }
format.xml
> [...]
>> So either a) what is the proper technique for using after_initialize, or
>> b) is there another way I can pass params to an AR model in a .new call
>> ?
>
> Can't you just call Model.new(:the => 'params', :go => 'here') ?
I've never used that form, but I should have remembered it.
F
I was talking with a friend, and he suggested I store my shopping cart
data in cookies, then I wouldn't need sessions until I got to the
checkout pages (where they are getting set securely). Do you have an
opinion on this, it seems easier than implementing sub domains to me.
Also, thank you so
Hi,
This is the output HTML.
Flokkar mælitækis
Almennt
Hjartasjúkraþjálfun
Lungnasjúkraþjálfun
Taugasjúkraþjálfun
Öldrunarsjúkraþjálfun
BR,
Sindri
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google G
Okay - I'm stumped: is there a way to run unit tests without blowing
away data preloaded into the test database?
Details: our system uses a TimeDimension table -- think of it as a
datetime that's been highly decorated with additional info, such as
whether or not it's a holiday and other dimensiona
Greg Willits wrote:
[...]
> So either a) what is the proper technique for using after_initialize, or
> b) is there another way I can pass params to an AR model in a .new call
> ?
Can't you just call Model.new(:the => 'params', :go => 'here') ?
>
> Thx.
>
> -- greg willits
Best,
--
Marnen Laibo
That did it!
Thank you very much Rick!!
--
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, se
hi,
I tried to redirect rails to show action by passing controller, action,
and params. However, rails ignores the name of action totally!
what I got is http://mysite/controllername/paramId
so i have error message
here is the action code I used:
def update
@tip = current_user.tips.f
I have a case where I am abstracting the creation of models. After a
fair bit of indirection, I eventually get around to making a .new call.
I need to be able to pass params to that .new call.
I know I can't use def initialize() in an AR model (rather frustrating).
So, I have found some referenc
I have a toy rails app, 2.3.5 on Debian 'squeeze', that uses the
ActiveRecord session store. I can see that it set cookies and
inserts rows into the database table 'sessions'.
Inside a controller, how do I acquire a reference to the model object
representing the current session? This used to be
On Fri, Jun 11, 2010 at 5:37 PM, Max You wrote:
> Hi, I have a problem passing parameters via post.
> post_params="name="+name+"¬es="+notes+"&parent_nid="+parent_nid+"&authenticity_token="+window._token;
...
> the log part:
> Parameters: {"name"=>"abc",
> "authenticity_token"=>"d8c79e2216df723f37
On 2010-06-11 16:50, Ivan Nastyukhin wrote:
> u write in your controller
> session[:blala]
That worked, thanks.
--
Nick
--
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.co
Hello guys,
Do anyone know whether active scaffold works on rails3?
If so..can someone give the documentation of it as well plz...
Thank you dudes..
TC
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk
Hi, I have a problem passing parameters via post.
I've examined the log file of a scaffolded version against my AJAX
version and can't figure out what's wrong. I think I've also isolated
the problem to be parameter passing by using logger.debug.
the AJAX part;
var name=document.getElementById("nam
Since it is a relative path to the server, it is trying to access javascript
files in your server.
So you need to download all the javascript files which the html refer to and
place it to the relative path in your server.
On 11 June 2010 17:23, Vuong Hung wrote:
> Amala Singh wrote:
> > aha.
so i am trying to save to a join table in a habtm relationship, but i am
having problems.
from my view, i pass in a group id with:
= link_to "Create New User", new_user_url(:group => 1)
User model (user.rb)
class User < ActiveRecord::Base
has_and_belongs_to_many :user_groups
accepts_nested_at
Please post the HTML that is output from the form.
--
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
Hunter Mcmillen wrote:
> Hey everyone,
>
> I am currently writing a Bet program, which consists of 5 forms, a home
> form and a form for all of my tables. I am trying to use the button_to
> command to link from the home controller/index to another forms/edit
> action.
>
> This is what I have so
On 11 June 2010 20:10, Michael Pavling wrote:
> Bar.all(:joins => :foos).uniq
Seems to... quick and dirty test on one of my models:
>> Person.all(:include => :graduations).select { |person|
>> !person.graduations.empty? }.size
=> 87
>> Person.all(:include => :graduations).select { |person|
>>
On 11 June 2010 19:26, Rick DeNatale wrote:
> I'm having a senior moment. I've done this before but I can't remember how.
>
> I want to find all Bars that have at least one Foo, is it:
>
> Bar.all(:include => :foos, :conditions => "foo.id IS NOT NULL')
>
> or something else?
Doesn't...
Bar.al
http://ruby-lambda.blogspot.com/2010/06/remarkable-400alpha4.html
Why Upgrade: You want to use this with Rails 3.0 Beta 4
http://weblog.rubyonrails.org/2010/6/8/rails-3-0-beta-4-now-rc-in-days
Please keep in mind: remarkable/core, remarkable/active_model, and
remarkable/active_record works.
re
On Wed, Jun 9, 2010 at 7:34 PM, Clay H. wrote:
> previous = DateTime.strptime(thefile[i-1][1], "%m/%d/%Y %H:%M")
> current = DateTime.strptime(thefile[i][1], "%m/%d/%Y %H:%M")
> ...
>
> I then could do something like:
> diff = current - previous
>
> and check to see whether diff is greater than 10
Hi Rick,
On Fri, Jun 11, 2010 at 1:26 PM, Rick DeNatale wrote:
> I'm having a senior moment. I've done this before but I can't remember how.
>
> Two active record models,
>
> Foo belongs_to Bar
>
> Bar has_many Foos
>
> I want to find all Bars that have at least one Foo, is it:
>
> Bar.all(:incl
Hey everyone,
I am currently writing a Bet program, which consists of 5 forms, a home
form and a form for all of my tables. I am trying to use the button_to
command to link from the home controller/index to another forms/edit
action.
This is what I have so far, any help would be great:
<%= butt
I'm having a senior moment. I've done this before but I can't remember how.
Two active record models,
Foo belongs_to Bar
Bar has_many Foos
I want to find all Bars that have at least one Foo, is it:
Bar.all(:include => :foos, :conditions => "foo.id IS NOT NULL')
or something else?
--
Rick D
I have a Survey-Response application, where surveys can be created
with an arbitrary number of questions, and users can respond to an
arbitrary number of surveys.
A Survey has_many Questions and has_many Responses. Both a Question
and a Response has_many Answers. That way, everybody has a
relation
(Rails 2.3.8)
Say I have in config/locales/en.yml:
en:
activerecord:
attributes:
foo:
bar: 'Long%{br}name'
Now, in HTML I can do:
t(:'activerecord.attributes.foo.bar', :br => '')
and in LaTeX:
t(:'activerecord.attributes.foo.bar', :br => '')
However, this is doomed to f
Tim Shaffer wrote:
> this.getAttribute("value") won't work on a select input, since the
> select doesn't have a "value" attribute. Rather, it has a list of
> options, and one or more of them are selected.
>
> Try this.selectedIndex.value instead.
Thanks for the suggestion, this.selectedIndex.valu
On Fri, Jun 11, 2010 at 2:15 PM, Leonardo Mateo wrote:
> On Fri, Jun 11, 2010 at 12:00 PM, doug wrote:
>>> You have to read from your socket.
>>
>> Ahh! I get it. (I said that I was green at this.) I now have it
>> working except that it is REALLY slow.
>>
>>> Can you post some more of the cod
On Fri, Jun 11, 2010 at 12:00 PM, doug wrote:
>> You have to read from your socket.
>
> Ahh! I get it. (I said that I was green at this.) I now have it
> working except that it is REALLY slow.
>
>> Can you post some more of the code?
>
> Here is my code that is now working:
>
> require 'sock
On Jun 11, 5:31 pm, Vuong Hung wrote:
> Colin Law wrote:
> > On 11 June 2010 17:03, Vuong Hung wrote:
> >> Hi all,
> >> I want to get data from website load with Ajax.
> >> Looking forward soon.
>
> > I think you will give rather more explanation of what you are trying
> > to do, 'get data from
this.getAttribute("value") won't work on a select input, since the
select doesn't have a "value" attribute. Rather, it has a list of
options, and one or more of them are selected.
Try this.selectedIndex.value instead.
--
You received this message because you are subscribed to the Google Groups "
Hello,
I'm wondering if anyone can help me understand what the expected
behavior would be if i were to use include and joins together on the
same association. I know from a straight rails perspective that it
would be a little silly to do since the include will end up doing the
join at the databas
Colin Law wrote:
> On 11 June 2010 17:03, Vuong Hung wrote:
>> Hi all,
>> I want to get data from website load with Ajax.
>> Looking forward soon.
>
> I think you will give rather more explanation of what you are trying
> to do, 'get data from website load with ajax' does not mean much to
> me.
>
Amala Singh wrote:
> aha. I checked it.
> I did this:
> doc = Nokogiri::HTML(open("http://priceonline.hsc.com.vn";).read)
> my_file = File.new("abc.html", "w")
> my_file.puts doc.inner_html
> my_file.close
>
> And compared the abc.html with the website, abc.html was the very same
> as
On 11 June 2010 17:03, Vuong Hung wrote:
> Hi all,
> I want to get data from website load with Ajax.
> Looking forward soon.
I think you will give rather more explanation of what you are trying
to do, 'get data from website load with ajax' does not mean much to
me.
Colin
--
You received this m
Hi all,
I want to get data from website load with Ajax.
Looking forward soon.
Thanks all.
--
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...@go
aha. I checked it.
I did this:
doc = Nokogiri::HTML(open("http://priceonline.hsc.com.vn";).read)
my_file = File.new("abc.html", "w")
my_file.puts doc.inner_html
my_file.close
And compared the abc.html with the website, abc.html was the very same as
the website.
I think it is somethin
Vuong Hung wrote:
> Amala Singh wrote:
>> If you put in the view then you may need to strip of the html tags.
>>
>> Try the following in the console.
>>
>> require 'open-uri'
>> require 'nokogiri'
>>
>> doc = Nokogiri::HTML(open("http://www.tamil.net";).read)
>>
Amala Singh wrote:
> If you put in the view then you may need to strip of the html tags.
>
> Try the following in the console.
>
> require 'open-uri'
> require 'nokogiri'
>
> doc = Nokogiri::HTML(open("http://www.tamil.net";).read)
> puts doc.inner_html
>
>
Hi,
I have a dropdown menu which shows the categories available. When a user
selects one I want the browser to redirect to the selected category.
I now have this code I found on stackoverflow;
<%form_for :cat_form, :url => {:action => :viewflokkur_selected} do
|f|%>
<%= f.select :cat, @cats_fo
Thanks!
On Jun 11, 10:49 am, Frederick Cheung
wrote:
> On Jun 11, 3:43 pm, Lille wrote:> Hi,
>
> > Can someone please confirm that accessors cannot be used in
> > ActionController to 'persist' values between requests, at least, not
> > without persisting to the database?
>
> > I'm trying to mini
> You have to read from your socket.
Ahh! I get it. (I said that I was green at this.) I now have it
working except that it is REALLY slow.
> Can you post some more of the code?
Here is my code that is now working:
require 'socket'
socket=TCPSocket::open("ip","port")
out=File.ope
On Jun 11, 3:43 pm, Lille wrote:
> Hi,
>
> Can someone please confirm that accessors cannot be used in
> ActionController to 'persist' values between requests, at least, not
> without persisting to the database?
>
> I'm trying to minimize AJAX calls by storing information from certain
> of my ca
Hi,
Can someone please confirm that accessors cannot be used in
ActionController to 'persist' values between requests, at least, not
without persisting to the database?
I'm trying to minimize AJAX calls by storing information from certain
of my calls for use by others later, but my attempts fail.
If you put in the view then you may need to strip of the html tags.
Try the following in the console.
require 'open-uri'
require 'nokogiri'
doc = Nokogiri::HTML(open("http://www.tamil.net";).read)
puts doc.inner_html
If you want to place it in the view, th
Vuong Hung wrote:
> Bala wrote:
>> try hpricot it'll be usefull
Thanks, Bala.
I try using 'hpricot' but I can get a little data on website, not all.
I think some data to view by Ajax or JavaScript. Can you tell me other
idea?
Code to this:
Controller:
@doc = Hpricot(open("http://priceonline.
Archival, removal, report and suspension aren't really resources...
they're actions on an Item.
Option 2 is definitely the preferred approach IMHO.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" grou
Bala wrote:
> try hpricot it'll be usefull
Thanks, Bala.
I try using 'hpricot' but I can get a little data on website, not all.
I think some data to view by Ajax or JavaScript. Can you tell me other
idea?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are sub
I have an Item class with archive(), remove(), report() and suspend()
methods.
I'm trying to decide how to map controllers and actions to each of
those methods. I can create a separate resource for each method:
resources :items do
resource :archival
resource :removal
resource :report
reso
you will get spec/ from rspec and /features with cucumber.
Don;t forget to install Cucumber and boostrap it. Your stories will go in
/features and your steps in /spec.
hope that helps.
-Ants
On 11 June 2010 14:04, sebastianzillessen wrote:
> Hej out there,
>
> i'm a newbie on ror and im tryin
sebastianzillessen wrote:
> Hej out there,
>
> i'm a newbie on ror and im trying to install rspec on my computer. I
> installed rspec an rspec-rails via gem.
>
> when i'm running the file script/generate rspec it works. but i have
> no folder called stories
> how can i fix this problem?
Ther
On Fri, Jun 11, 2010 at 3:04 AM, doug wrote:
> I am trying to interface to an API. I am instructed to use the server
> and port information provided to setup a TCP socket. I did that like
> this:
>
> require 'socket'
> my_socket=TCPSocket::open("ip","port")
>
> Where "ip" and "port" are
Oh, I'm having the same problem in development mode too.
On 11 June, 13:49, Ivan Nastyukhin wrote:
> if in production mode yes,http://github.com/dieinzige/haml
> haml insrt in rack, and in each request, try doing update_css and get a error
>
> i simplify remove update sass to css,http://github.c
u write in your controller
session[:blala]
if u not write it, u are not using session
Ivan Nastyukhin
dieinz...@me.com
On Jun 11, 2010, at 4:45 PM, Nick wrote:
> On 2010-06-11 01:19, Frederick Cheung wrote:
>> Rails won't create a session until you try and use one, which you
>> don't appea
if in production mode yes,
http://github.com/dieinzige/haml
haml insrt in rack, and in each request, try doing update_css and get a error
i simplify remove update sass to css, http://github.com/dieinzige/haml, and run
rake by my own hands)
because its was simlify solutions, in next time, i wil
On 2010-06-11 01:19, Frederick Cheung wrote:
> Rails won't create a session until you try and use one, which you
> don't appear to be doing
How does one "use a session"?
> Fred
--
Nick
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
T
Yes I am, is this a known problem?
On 11 June, 13:15, Ivan Nastyukhin wrote:
> hi
> are u using haml ?
>
> Ivan Nastyukhin
> dieinz...@me.com
>
> On Jun 11, 2010, at 4:09 PM, Mark wrote:
>
>
>
> > Hi all,
>
> > I'm getting an error in my rails 3 app when trying to update a user's
> > profile:
>
>
Hej out there,
i'm a newbie on ror and im trying to install rspec on my computer. I
installed rspec an rspec-rails via gem.
when i'm running the file script/generate rspec it works. but i have
no folder called stories
how can i fix this problem?
thanks...
hope to get some help;)
--
You rec
hi
are u using haml ?
Ivan Nastyukhin
dieinz...@me.com
On Jun 11, 2010, at 4:09 PM, Mark wrote:
> Hi all,
>
> I'm getting an error in my rails 3 app when trying to update a user's
> profile:
>
>
> Started POST "/users/1328-mturner" for 127.0.0.1 at 2010-06-11
> 13:02:09
>
> ActionContro
Hi all,
I'm getting an error in my rails 3 app when trying to update a user's
profile:
Started POST "/users/1328-mturner" for 127.0.0.1 at 2010-06-11
13:02:09
ActionController::RoutingError (No route matches "/users/1328-
mturner"):
I'm not sure why this is happening as I'm using a standard c
install ree, and remove all your problems
Ivan Nastyukhin
dieinz...@me.com
On Jun 11, 2010, at 2:31 PM, Yiannis wrote:
> Thank you for your answer but can you be a little more specific? I
> have ubuntu and I have already installed openssl libraries but it
> doesn't work. I found some guides
Thank you for your answer but can you be a little more specific? I
have ubuntu and I have already installed openssl libraries but it
doesn't work. I found some guides which says to go at \gems\ruby-1.8.7-
p249\ext\openssl but I didn't have the folder /ext/openssl/ .
On 11 Ιούν, 00:36, Greg Donal
try hpricot it'll be usefull
On Fri, Jun 11, 2010 at 2:59 PM, Ivan Nastyukhin wrote:
> hi
> looking for mechanize and nokogiri
>
> Ivan Nastyukhin
> dieinz...@me.com
>
>
>
>
>
>
> On Jun 11, 2010, at 1:25 PM, Vuong Hung wrote:
>
> > Hi, everybody.
> >
> > I am newbie RoR.
> >
> > I want to get
hi
looking for mechanize and nokogiri
Ivan Nastyukhin
dieinz...@me.com
On Jun 11, 2010, at 1:25 PM, Vuong Hung wrote:
> Hi, everybody.
>
> I am newbie RoR.
>
> I want to get all data from other website.
>
> Thanks a lot and looking forward.
> --
> Posted via http://www.ruby-forum.com/.
Hi, everybody.
I am newbie RoR.
I want to get all data from other website.
Thanks a lot and looking forward.
--
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 t
On Jun 11, 3:41 am, Nick wrote:
>
>
> The app starts without error and brings up the 'Hello World' page. It
> doesn't attempt to set a cookie and no row appears in the sessions
> table.
>
> What's wrong?
>
Rails won't create a session until you try and use one, which you
don't appear to be doin
I attempted to make a toy rails 2.3.5 application in Debian 'squeeze'
that uses the database to store sessions.
My environment.rb is
require File.join(File.dirname(__FILE__), 'boot')
Rails::Initializer.run do |config|
config.action_controller.session_store = :active_record_store
And if you want to get rid of them for some reason just create new
initializer with following code:
ENV['RAILS_ASSET_ID'] = ''
and restart your server. All this numbers will go away.
On Jun 11, 2010, at 1:00 AM, P.A. wrote:
Hi.
I just wonder why do the javascript_include_tag and
stylesheet
in my rails application i am search thru tables...based on a
criteriaand then return the result in form of an xml document..
i have tried using Rexml::builder and also Nokigiri::builder and still
i am not able to reduce the rendering time.
i.e
Completed in 1.99900 (0 reqs/sec) | Renderin
Dear All,
I am facing a problem - when I am hitting http://localhost:3000/login_c
to enter to our system, webrick/mongrel quiting from command prompt.
I am getting this error-
""
C:\Obs>mongrel_rails start
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environmen
74 matches
Mail list logo