Re: [Rails] authlogic and NameError "undefined local variable or method `login'"

2010-04-02 Thread Colin Law
On 2 April 2010 13:18, Marian Steinbach wrote: > Hi! > I am using authlogic and I have a User model (with act_as_authentic) > without the "login" field, since I use "email" as the user name. As it > says in the authlogic documentatation, that should be the way it works > when there is no login fie

[Rails] Paperclip permission denied error

2010-04-02 Thread Chris Mentch
I am hoping someone could shed some light on this problem. I am setting up a new server to host a Rails app and it is almost done. The only error I'm getting is permission denied when the Paperclip plugin uploads the image and attempts to move it to its final location. It can upload to the temp fo

[Rails] has_many comments, belongs to post

2010-04-02 Thread David Zhu
I made a posts scaffold, and a comments scaffold Now i want to link the two of them together by -- Post-- has_many :comments and comments- belongs_to :post After that, I have no idea what to do in the controller or form for my comments What do i need to change in the comments controller an

[Rails] Re: App_Controller and partial issues with has_many through

2010-04-02 Thread Jason Newport
So I put this in my controller: logger.debug "Person attributes hash: #...@user_interests.inspect}" And got this: Person attributes hash: [#, #] Shouldn't it be the interest.post info for each interest, not just the model attributes for the interest table? -- Posted via http://www.ruby-forum.

Re: [Rails] Re: Ruby-ldap timeout

2010-04-02 Thread Marcelo de Moraes Serpa
Correction. SystemTimer works when binding, but *does not work* with the search / search2 method(s). If the LDAP server hangs for any reason, SystemTimer fails to kill the thread, and even though the Timeout::Error exception is thrown, it is only after much more time than what you define in the tim

[Rails] Re: Using Builders

2010-04-02 Thread RVince
Here is the builder file: xml = Builder::XmlMarkup.new xml.graph(:caption=>'Closing Ratios', :numberPrefix=>'', :formatNumberScale=>'0',:decimalPrecision=>'4') do for item in arr_data xml.set(:name=>item[0], :value=>item[1],:color=>''+get_FC_color) end end -- You

[Rails] Re: App_Controller and partial issues with has_many through

2010-04-02 Thread Jason Newport
When inspecting it I get [#,#,#,#] and my title reads "Your Interests (4)" and the print out is # # # # What is # all about? Is that an object filled with objects? Colin Law wrote: > On 2 April 2010 15:07, Jason Newport wrote: >> class ApplicationController < ActionController::Base >> �end

[Rails] Re: Need help with find

2010-04-02 Thread RVRoadie
Finally figured out something that worked. @club = Club.find(params[:club_id]) ids = @club.members.connection.select_values('SELECT person_id FROM members') @people = Person.all(:order => 'name_sort', :conditions => ["id NOT IN (?)", ids]) Any comments or be

[Rails] GurusQ: Metal calling disparity-How to install metal in code

2010-04-02 Thread Mr Magpie
I have a simple class that I want to install as Rails Metal. I don't want to put it into a file in app/metal for reasons I don't want to go into. It looks like this, and handler is defined elsewhere. class UrlFilter ALLOW = [404] DENY = [403] def self.call(env) handler.call(env["PATH_INF

[Rails] Re: Rails cascading delete

2010-04-02 Thread Hilal
Thanks all. Destroy worked great!, Thanks Hila; On Apr 2, 2:41 am, Lasse Bunk wrote: > Hi Hilal, > > You need to use :dependent => :destroy instead of :delete_all because > :delete_all doesn't fire any callbacks. That's why it only deletes one > level. > > /Lasse > > 2010/4/2 Hilal > > > Hello

[Rails] Using Builders

2010-04-02 Thread RVince
I am using RoR 2.3, and have installed the builder gem I have a line in a view as follows: str_xml = render "fusioncharts/array_example/ss_array_data.builder", {:arr_data => @arr_data} Which does not set str_xml to anything. I can confirm that in my controller I have @arr_data set up an

[Rails] Re: Best way of sorting/grouping objects

2010-04-02 Thread Angelo Ashmore
By any chance do you have a model named PageType? If you, you could set up a relationship between PageType and Page: page.rb: belongs_to :page_type page_type.rb: has_many :pages Then display it with: your_controller.rb: @page_types = PageType.all your_view.html.haml (or .erb, etc.) - @page_typ

[Rails] Re: "new" form as partial?

2010-04-02 Thread Dudebot
On Apr 2, 4:27 pm, Marian Steinbach wrote: > Creating a certain type of database record is a very frequent task in > my application (or at least it should be ;-)). So I want to be able to > place the form for creating that database record in practically any > view, not just the /mymodel/new vie

[Rails] Re: ScrAPI HTTPNoAccessError

2010-04-02 Thread Jules Copeland
I should also add - Before I got the findurl method to just strip out any URLs with non standard characters, I tried this line: fullurl.gsub!(",","%2C") Which replaced the commas with the URL friendlier code. This didn't work either, nor did putting the whole lot inside a CGI.escape("") The s

[Rails] Re: Weird date/time incompatibility

2010-04-02 Thread Dudebot
On Apr 2, 6:05 pm, Craig White wrote: > they actually are in sync > > Fri Apr  2 17:13:05 CDT 2010 == 2010-04-02 22:13:05 (UTC) as CDT is UTC > + 5 hours Sorry for my sloppiness--I understand. I guess my main question is why would it show the correct time in the view on one machine, but not an

[Rails] ScrAPI HTTPNoAccessError

2010-04-02 Thread Jules Copeland
Hi, I'm having some problems using scrAPI. I'm getting some HTTPNoAccessErrors on certain urls. The program searches a page (http://en.wikiquote.org/wiki/List_of_films) for all of the links on it that go to pages with movie quotes on them. It then loops through the list, pulling out the details

Re: [Rails] Re: Weird date/time incompatibility

2010-04-02 Thread Craig White
On Fri, 2010-04-02 at 15:28 -0700, Dudebot wrote: > > On Apr 2, 3:12 pm, Colin Law wrote: > > > Am I right in assuming that is what is contained in the > in the html? If so then the first thing is that they are in different > > timezones. Can you confirm that you are definitely seeing the abo

[Rails] Re: HAS_MANY BELONGS_TO noobie question

2010-04-02 Thread David Zhu
bump... :) i really need help guys. On Apr 2, 12:39 pm, David Zhu wrote: > Oh, thanks that relaly helped, but one more thing- > > If i assigned posts to anotherposts, through a has_many :anotherposts > and belongs_to :posts relationship, how would i do @post = > current_user.posts.build(params[:p

[Rails] Re: Rails model design visualization

2010-04-02 Thread Dudebot
On Apr 2, 3:49 pm, "Joe Smith" wrote: > In addition to railroads, The rubymine IDE has a visualization system. Uses > the (proreitary) yFiles Graph visualization library, so the images look a > little fancier, but the basic graphs are not too disimilar. Thanks, Joe! I'll have to check it out.

[Rails] Re: Weird date/time incompatibility

2010-04-02 Thread Dudebot
On Apr 2, 3:12 pm, Colin Law wrote: > Am I right in assuming that is what is contained in the in the html?  If so then the first thing is that they are in different > timezones.  Can you confirm that you are definitely seeing the above > dates with the same version of the code.  You said you h

[Rails] HELP!! Rake aborted! Can't modify frozen hash

2010-04-02 Thread Patrick Neve
Too bad even the trace doesn't say which hash is involved. Sorry this post is long: am trying to provide enough context to be meaningful. Occurs _intermittently_ when rake jobs:work is pulling a command out of delayed_jobs while my status observer is in the process of parsing a log file for det

[Rails] Re: Trying to create search filter persistence using SearchLogic

2010-04-02 Thread Patrick Shainin
Patrick Shainin wrote: > > For example, to add a check box that limits the search to rows with a > certain condition, you could define a named scope in Model.rb like this: > > named_scope :my_condition, :conditions => "your sql condition here" > > Then in the view form, you would include: > <%=

[Rails] "new" form as partial?

2010-04-02 Thread Marian Steinbach
Hi! I think I'm trying to accomplish something very common, but I can't find a way to do it. Creating a certain type of database record is a very frequent task in my application (or at least it should be ;-)). So I want to be able to place the form for creating that database record in practically

Re: [Rails] Re: Rails model design visualization

2010-04-02 Thread Marian Steinbach
>> Railroad does this (after a fashion) http://railroad.rubyforge.org/ > > So that rocks. When did the world get so ultra cool? *Many, many* > thanks. plus one from me! Thank you very much! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" grou

Re: [Rails] Re: Rails model design visualization

2010-04-02 Thread Marian Steinbach
>> Railroad does this (after a fashion) http://railroad.rubyforge.org/ > > So that rocks.  When did the world get so ultra cool?  *Many, many* > thanks. plus one from me! Thank you very much! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" grou

[Rails] Re: Two controllers with create using the same model

2010-04-02 Thread WSzP
Thanks a lot Colin, First of all, I'm using Rails 2.3.5. and Ruby 1.8.7. The generated HTML looks like this: The option suggested by you: <% form_for :student, @student, :url => {:controller => 'beiratkozas', :action => "create" }, :html => { :method => :post, :id => "beiratkozok" } do |f| %> g

[Rails] Re: Trying to create search filter persistence using SearchLogic

2010-04-02 Thread Patrick Shainin
dburges wrote: > I have just set up a search form on my index using SearchLogic- it > works great. However, since there are several search parameters in the > form I want the results of the most recent search to remain in effect > until the user does a new search. I can't figure out how to do this!

Re: [Rails] http://api.rubyonrails.org/ not working!!

2010-04-02 Thread Xavier Noria
On Fri, Apr 2, 2010 at 8:57 PM, rorguy wrote: > Not sure if anyone else has looked at it, but I have been seeing this > for about a week now. The link "Rails: Complete API" on Documentaion > page on http://rubyonrails.org/documentation is not working. It fails > with following error: > > Precondi

[Rails] Re: http://api.rubyonrails.org/ not working!!

2010-04-02 Thread Frederick Cheung
On Apr 2, 9:55 pm, Greg Donald wrote: > On Fri, Apr 2, 2010 at 12:57 PM, rorguy wrote: > > Not sure if anyone else has looked at it, but I have been seeing this > > for about a week now. The link "Rails: Complete API" on Documentaion > > page onhttp://rubyonrails.org/documentationis not working

[Rails] Re: please help; form_for passes nil

2010-04-02 Thread Frederick Cheung
On Apr 2, 6:23 pm, dirtbug wrote: > I have an update button that doesn't update.  Watching the server > during the attempt, I see: > > Processing OrvesController#update (for 128.119.60.171 at 2010-04-02 > 13:13:29) [PUT] >   Parameters: {"orf"=>nil, "commit"=>"Update", "id"=>"19544"} > > orf is

Re: [Rails] http://api.rubyonrails.org/ not working!!

2010-04-02 Thread Greg Donald
On Fri, Apr 2, 2010 at 12:57 PM, rorguy wrote: > Not sure if anyone else has looked at it, but I have been seeing this > for about a week now. The link "Rails: Complete API" on Documentaion > page on http://rubyonrails.org/documentation is not working. It fails > with following error: > > Precondi

[Rails] http://api.rubyonrails.org/ not working!!

2010-04-02 Thread rorguy
Hi, Not sure if anyone else has looked at it, but I have been seeing this for about a week now. The link "Rails: Complete API" on Documentaion page on http://rubyonrails.org/documentation is not working. It fails with following error: Precondition Failed The precondition on the request for the UR

[Rails] please help; form_for passes nil

2010-04-02 Thread dirtbug
I have an update button that doesn't update. Watching the server during the attempt, I see: Processing OrvesController#update (for 128.119.60.171 at 2010-04-02 13:13:29) [PUT] Parameters: {"orf"=>nil, "commit"=>"Update", "id"=>"19544"} orf is my model I'm trying to update in the database. Why

Re: [Rails] Rails and PHP app under the same domain

2010-04-02 Thread Marian Steinbach
Hi! Depending on how much power you have over your server, I would recommend "pound" for that. But it does a little more than only what you want. And it requires that you change your complete virtual server configuration. http://www.apsis.ch/pound/ Regards, Marian On Fri, Apr 2, 2010 at 1:59

[Rails] authlogic and NameError "undefined local variable or method `login'"

2010-04-02 Thread Marian Steinbach
Hi! I am using authlogic and I have a User model (with act_as_authentic) without the "login" field, since I use "email" as the user name. As it says in the authlogic documentatation, that should be the way it works when there is no login field. When I create new users manually via the User -> new

[Rails] Issue with libxml validation block

2010-04-02 Thread Clément LAGRANGE
Hello, I have a weird issue with the ruby Libxml2 ruby bindings in a Rails project. I use the validate_schema method, with a block which should be called on each validation error. The problem is that this block is not always triggered : specifically, it works with the Webbrick server, but NOT with

[Rails] Re: Rails model design visualization

2010-04-02 Thread Joe Smith
"Dudebot" wrote in message news:f2c00b23-cb4a-4b09-9325-d2c64c3a4...@w17g2000yqj.googlegroups.com... I'm a fairly visual person, and I have a piece of paper with many boxes and arrows with labels like "has many" and "belongs to" for my database models. It's messy, but it works. What I keep

Re: [Rails] Re: Two controllers with create using the same model

2010-04-02 Thread Colin Law
On 2 April 2010 21:21, WSzP wrote: > Thanks a lot Colin, that was my problem. > > From documentation I managed to make a working form_for: > > <% form_for :student, @student, :url => { :action => "create" }, :html > => { :method => :post, :id => "beiratkozok" }   do |f| %> > > This works, but I do

[Rails] Re: Two controllers with create using the same model

2010-04-02 Thread WSzP
Thanks a lot Colin, that was my problem. >From documentation I managed to make a working form_for: <% form_for :student, @student, :url => { :action => "create" }, :html => { :method => :post, :id => "beiratkozok" } do |f| %> This works, but I don't understand why do I need the :student in the

[Rails] Re: Two controllers with create using the same model

2010-04-02 Thread WSzP
On Apr 2, 3:45 pm, DmitryPush wrote: > so now we can see exactly what rails told you - it is now create > method in student controller. :) > and why you view requesting student controller i already told you. > :) > > On Apr 2, 4:39 pm, WSzP wrote: > > > Hello, > > Thanks a lot, and here is my s

Re: [Rails] Re: Two controllers with create using the same model

2010-04-02 Thread Colin Law
On 2 April 2010 21:00, WSzP wrote: > You got me wrong. I can't put the create method in the student > controller. > The question if, how could I use the create method from the > BeiratkozasController class, while the model is NOT Beiratkozas, but > Student. Have a look at the docs for form_for, y

Re: [Rails] Re: Weird date/time incompatibility

2010-04-02 Thread Colin Law
On 2 April 2010 20:42, Dudebot wrote: > > > On Apr 2, 6:30 am, Colin Law wrote: > >> You say the html is correct in the index view so it cannot be an issue >> passing the dates to the index view, or you would see the wrong dates >> there. > > Thanks for helping with this.  What I see in the devel

[Rails] Re: Two controllers with create using the same model

2010-04-02 Thread WSzP
You got me wrong. I can't put the create method in the student controller. The question if, how could I use the create method from the BeiratkozasController class, while the model is NOT Beiratkozas, but Student. WSZP -- You received this message because you are subscribed to the Google Groups "R

[Rails] Re: Two controllers with create using the same model

2010-04-02 Thread WSzP
You got me wrong. I can't put the create method in the student controller. The question if, how could I use the create method from the BeiratkozasController class, while the model is NOT Beiratkozas, but Student. WSZP -- You received this message because you are subscribed to the Google Groups "R

[Rails] Re: Accessing models in "mounted" Rails 3 app

2010-04-02 Thread Angelo Ashmore
I think I just realized why this is happening. The container app is just a sample for testing out the mounted app, and I named it "Shop". I imagine there's some kind of conflict going on between the Shop defined in application.rb and the Shop defined in the model. Gonna go test this now, but I thi

[Rails] Re: Weird date/time incompatibility

2010-04-02 Thread Dudebot
On Apr 2, 6:30 am, Colin Law wrote: > You say the html is correct in the index view so it cannot be an issue > passing the dates to the index view, or you would see the wrong dates > there. Thanks for helping with this. What I see in the development html is ? date=2010-03-31+18%3A19%3A00+UTC

[Rails] Re: Accessing models in "mounted" Rails 3 app

2010-04-02 Thread Angelo Ashmore
Okay, it looks like Rails is pulling an April Fools on me. It like 18 of the 19 models are accessible. I tried to list all the models using: ActiveRecord::Base.send(:subclasses).each { |model| puts model.name } and it only returned three of the models. Accessing all the models directly (typing "I

[Rails] Re: Is it possible to have a form without a submit tag in rails?

2010-04-02 Thread Srijith nair
There may be chance of form without submit button .. In your example might be form is submitting in script by using the javascript function submit() inside the script tag, when any of the field changed inside the form $("#student_name").change(function(){ $("#sree").submit() }) <%=text_field

[Rails] Re: Best way of sorting/grouping objects

2010-04-02 Thread Brent
That could work. But I need it to order by page_order also. I would like to group them into 3 groups then sort them by that. In the end I want it to look something like this in html... TYPE ONE Page 1 Page 2 TYPE TWO Page 1 Page 2 Before I was doing something like this (I had an array of each

[Rails] Re: Issue with character encoding in http request

2010-04-02 Thread Frederick Cheung
On Apr 2, 4:23 pm, Christophe Decaux wrote: > > By the way, I cannot ask the request sender to change his encoding method... > On the other hand, I've setup everything in my app to use utf-8 which works > fine... > Well if you cannot change the sender then you don't have a choice - you'll have

Re: [Rails] Is it possible to have a form without a submit tag in rails?

2010-04-02 Thread Philip Hallstrom
This is probably a stupid question but I am confused... I see an example in the 3d Edition of Agile Dev with Rails (page 539) where a simple calculator view, with two text boxes for numbers and a dropdown for what operation to perform, does not mention a submit button or gesture. I don't unde

[Rails] Re: HAS_MANY BELONGS_TO noobie question

2010-04-02 Thread David Zhu
Oh, thanks that relaly helped, but one more thing- If i assigned posts to anotherposts, through a has_many :anotherposts and belongs_to :posts relationship, how would i do @post = current_user.posts.build(params[:post]) in this situation? Because i dont have the current_user helper anymore, becaus

[Rails] Issue with character encoding in http request

2010-04-02 Thread Christophe Decaux
Hi there, I have an issue with character encoding on http request that I need to handle in my rails apps. Here's an example of my log : Processing MessagesController#incoming (for 217.117.146.164 at 2010-04-02 16:08:27) [GET] Parameters: {"action"=>"incoming", "z"=>"Je suis un bon ?l?ve.", "a

[Rails] Re: Intermediate level tutorials

2010-04-02 Thread IanJ
Thanks for the replies. I'll give both the books a read. My gaps do seem to be as much Web related as Rails. Ian -- 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

[Rails] Is it possible to have a form without a submit tag in rails?

2010-04-02 Thread Pito Salas
This is probably a stupid question but I am confused... I see an example in the 3d Edition of Agile Dev with Rails (page 539) where a simple calculator view, with two text boxes for numbers and a dropdown for what operation to perform, does not mention a submit button or gesture. I don't understa

Re: [Rails] App_Controller and partial issues with has_many through

2010-04-02 Thread Colin Law
On 2 April 2010 15:07, Jason Newport wrote: > I have a User model, a Post model, and an Interest model: > User has_many posts through interests > User has_many interests, dependent destroy > Post has_many users through interests > has_many interests, dependent destroy > Post has_many interests > I

[Rails] Need help with find

2010-04-02 Thread RVRoadie
Kind of new at this and have been unable to find an example of what I want to do. I have three models, people, clubs and members. @members = @club.members.all --> finds all club members How do I write a find of all people that are not members of @club Thanks -- You received this message becau

[Rails] App_Controller and partial issues with has_many through

2010-04-02 Thread Jason Newport
I have a User model, a Post model, and an Interest model: User has_many posts through interests User has_many interests, dependent destroy Post has_many users through interests has_many interests, dependent destroy Post has_many interests Interest belongs to Post Interest belongs to User Applicati

Re: [Rails] Re: Superclass mismatch with Rails 3

2010-04-02 Thread Rick DeNatale
On Fri, Apr 2, 2010 at 8:02 AM, Phil Ostler wrote: > Indeed you are right, changing the name of my application has fixed > this. Thank you! > > Reason for me naming it Rails is because I have separate folders in my > project development for different elements (e.g. Rails, Database Schema, > Flex)

Re: [Rails] Rails and PHP app under the same domain

2010-04-02 Thread Rick DeNatale
On Fri, Apr 2, 2010 at 7:59 AM, Yiannis wrote: > Hello > > I have a rails site in a domain like http://domain.com/ which is in > one folder the whole application and a blog (wordpress - php > application in another folder) under http://blog.domain.com/. > > How can I do http://domain.com/blog/ sho

[Rails] Ruport - table data to []

2010-04-02 Thread RVince
Anyone on here know how to access the data used in a Ruport table and return it as an Array [] ? Thank you. -- 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 unsubsc

[Rails] Re: Two controllers with create using the same model

2010-04-02 Thread DmitryPush
so now we can see exactly what rails told you - it is now create method in student controller. :) and why you view requesting student controller i already told you. :) On Apr 2, 4:39 pm, WSzP wrote: > Hello, > Thanks a lot, and here is my students_controller.rb:http://pastie.org/900218 > So I had

[Rails] Re: Two controllers with create using the same model

2010-04-02 Thread WSzP
Hello, Thanks a lot, and here is my students_controller.rb: http://pastie.org/900218 So I had one, but forgot to paste it to pastie. Peter -- 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.

[Rails] Re: Two controllers with create using the same model

2010-04-02 Thread DmitryPush
In addition, it happens because you using <% form_for(@student) do | f| %> helper if you look in HTML code (this helper appears to) you can find that request will be send to student controller... On Apr 2, 4:15 pm, DmitryPush wrote: > in your link I can see: > beiratkozas_controller.rb > subs

[Rails] Re: Two controllers with create using the same model

2010-04-02 Thread DmitryPush
in your link I can see: beiratkozas_controller.rb subscriptions_controller.rb but where is students_controller.rb (StudentsController) ? Dose ruby asking you the same question?:) On Apr 2, 4:04 pm, WSzP wrote: > Any ideas? I still can't find out why this does not work, or how to > solve. Or yo

[Rails] Re: Two controllers with create using the same model

2010-04-02 Thread WSzP
Any ideas? I still can't find out why this does not work, or how to solve. Or you guys prefer pasting code into the email instead of http://pastie.org/899454 ? Thanks a lot. And Happy Easter! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group

[Rails] Re: Superclass mismatch with Rails 3

2010-04-02 Thread Phil Ostler
Indeed you are right, changing the name of my application has fixed this. Thank you! Reason for me naming it Rails is because I have separate folders in my project development for different elements (e.g. Rails, Database Schema, Flex) and it always worked in Rails 2 fine for me this way. I've

[Rails] Rails and PHP app under the same domain

2010-04-02 Thread Yiannis
Hello I have a rails site in a domain like http://domain.com/ which is in one folder the whole application and a blog (wordpress - php application in another folder) under http://blog.domain.com/. How can I do http://domain.com/blog/ shows up the php application? Thank you! -- You received thi

Re: [Rails] Re: Weird date/time incompatibility

2010-04-02 Thread Colin Law
On 2 April 2010 12:16, Dudebot wrote: > On Apr 2, 2:22 am, Colin Law wrote: > ... > > Checking the html, the database entries with phpMyAdmin, and the log > file were where I went first--I should have written that.  It's all > there, just like the development environment.  The log file was what >

[Rails] Re: Weird date/time incompatibility

2010-04-02 Thread Dudebot
On Apr 2, 2:22 am, Colin Law wrote: ... Checking the html, the database entries with phpMyAdmin, and the log file were where I went first--I should have written that. It's all there, just like the development environment. The log file was what pointed me to the database call, and I mocked it up

Re: [Rails] Re: rss feed

2010-04-02 Thread Lasse Bunk
You can do this with routing – in config/routes.rb: map.rss '/feeds/articles', :controller => 'articles', :action => 'index', :format => 'rss' /Lasse 2010/4/2 Rahul Mehta > hii lasse > > i have read this article but how to place rss feed to folder.. > thanks for reply.. > > > > On Apr 2, 3

[Rails] Form Authenticity Token Error generated from iframe

2010-04-02 Thread nisha
Hi, Iam trying to link my app from another site. I have used iframes and a form is being loaded in the iframe embeded in another site outside my rails app. So when the user submits this form it should effectively take me to the application site with the post data... iam getting authenticity token

[Rails] Re: rss feed

2010-04-02 Thread Rahul Mehta
hii lasse i have read this article but how to place rss feed to folder.. thanks for reply.. On Apr 2, 3:25 pm, Lasse Bunk wrote: > http://paulsturgess.co.uk/articles/show/13-creating-an-rss-feed-in-ru... > > 2010/4/2 Rahul Mehta > > > its not giving useful result dear .. > > > On Apr 2, 2:47

Re: [Rails] Re: rss feed

2010-04-02 Thread Lasse Bunk
http://paulsturgess.co.uk/articles/show/13-creating-an-rss-feed-in-ruby-on-rails 2010/4/2 Rahul Mehta > its not giving useful result dear .. > > On Apr 2, 2:47 pm, Lasse Bunk wrote: > > Rahul, > > > > Tryhttp://www.google.com/search?q=rails+rss+feed > > > > /Lasse > > > > 2010/4/2 Rahul Mehta

[Rails] Re: rss feed

2010-04-02 Thread Rahul Mehta
its not giving useful result dear .. On Apr 2, 2:47 pm, Lasse Bunk wrote: > Rahul, > > Tryhttp://www.google.com/search?q=rails+rss+feed > > /Lasse > > 2010/4/2 Rahul Mehta > > > hi all, > > > for my project need to generate rss feed and place in folder what to > > do ? > > > we need to have RSS

[Rails] [RAILS 3] 2 sup app in 1 app

2010-04-02 Thread Nicolas 2b
Hi, I'm building an app which will become quite big (I hope ;-) ) and so I want to separate admin part and customers part. By separate, I mean not 2 namespaces (=1 app), but really 2 app (so I can shutdown customers and keep admin access for example). But, because the logic/model is the same, and

Re: [Rails] rss feed

2010-04-02 Thread Lasse Bunk
Rahul, Try http://www.google.com/search?q=rails+rss+feed /Lasse 2010/4/2 Rahul Mehta > hi all, > > for my project need to generate rss feed and place in folder what to > do ? > > we need to have RSS feed generated and placed inside /feeds folder. > Format of these feeds should be valid RSS fee

[Rails] rss feed

2010-04-02 Thread Rahul Mehta
hi all, for my project need to generate rss feed and place in folder what to do ? we need to have RSS feed generated and placed inside /feeds folder. Format of these feeds should be valid RSS feed format. These feed should contain whatever information is present in the field or everything in the

Re: [Rails] Rails cascading delete

2010-04-02 Thread Lasse Bunk
Hi Hilal, You need to use :dependent => :destroy instead of :delete_all because :delete_all doesn't fire any callbacks. That's why it only deletes one level. /Lasse 2010/4/2 Hilal > Hello There: >I am trying to do a deep cascading deletes in rails. > > The schema looks like this: > > Blogs

Re: [Rails] Rails cascading delete

2010-04-02 Thread Michael Pavling
On 2 April 2010 08:08, Hilal wrote: > Hello There: >    I am trying to do a deep cascading deletes in rails. > >   The problem I am having is that deleting blogs, will only delete > entries, but will not delete comments. In other words, the cascading > delete isn't deep? > >   Am I doing something

[Rails] Re: Ruby array, javascript and json issue

2010-04-02 Thread Frederick Cheung
On Apr 1, 11:29 pm, John Merlino wrote: > Hey all, > > I am unable to get a highcharts plugin to render a chart in a rails > application:http://github.com/loudpixel/highcharts-rails > > I believe it has something to do with the sql queries to the database > placed in a ruby array, which the java

[Rails] Rails 2.3 SafeBuffer leaked evil all over my yaml

2010-04-02 Thread skwp
I've been googling for a while to find a solution to this, but can't seem to. What's happening is that after upgrading from rails 2.1 to rails 2.3, my YAML started getting, for lack of a better word, 'evil' due to the introduction of the SafeBuffer class. I thought SafeBuffer was related to ERB i

[Rails] Rails cascading delete

2010-04-02 Thread Hilal
Hello There: I am trying to do a deep cascading deletes in rails. The schema looks like this: Blogs (has many) entries ( has many ) comments A blog has n entries, an entry has n comments. So, in my Blog model I use has_many :entries, :dependent => :delete_all and in my Entry model I use has

[Rails] uninitialized constant MysqlCompat::MysqlRes

2010-04-02 Thread Garfield.Yu
Macbook 466 Mac OS X 10.6.3 Rails 2.3.5 Ruby 1.8.7 MySQL mysql-5.1.45-osx10.6-x86 after install mysql gem with "sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config " use "rake db:migrate" but always dispay the error msg: rake aborted! unin

Re: [Rails] named_scope when using foreign keys

2010-04-02 Thread Colin Law
On 2 April 2010 09:06, jeb wrote: > Hi all, > > I can't get this named scope to work. Each store has a number of > users. Each store can have one manager. I ant to use a nemed scope to > find the manager by name. Have I got this totally backwards? > > Help appreciated > :-) jonas > > > class Store

Re: [Rails] named_scope when using foreign keys

2010-04-02 Thread Michael Pavling
On 2 April 2010 09:06, jeb wrote: > class Store < ActiveRecord::Base >  has_many :users, :dependent => :destroy >  belongs_to :manager, :class_name => "User", :foreign_key => > "manager_id" >  named_scope :manager_name, lambda{|name| {:include > => :manager, :conditions => ['manager.name = ?', nam

[Rails] Re: Loading Fixtures Earlier

2010-04-02 Thread Sijo k g
> Is there any way to have fixtures loaded earlier on in the testing > process, or is there some proper Rails-provided way to seed the test > database? Yes. From 2.3.4 onwards there is db/seeds.rb file .You can write put data there. For more information please watch this Railscast http://ra

[Rails] Re: providing feedback to users

2010-04-02 Thread DmitryPush
It can by manage if you you using AJAX, and it's many ways to do it, there one: just show some pleas wait on 'ajax start' event and hide this one on 'ajax end' event. If you choose jqure (jquery.com) it would look like: $("#loading").ajaxStart(function(){ $(this).show(); }); ("#loading").aj

[Rails] named_scope when using foreign keys

2010-04-02 Thread jeb
Hi all, I can't get this named scope to work. Each store has a number of users. Each store can have one manager. I ant to use a nemed scope to find the manager by name. Have I got this totally backwards? Help appreciated :-) jonas class Store < ActiveRecord::Base has_many :users, :dependent =

Re: [Rails] Weird date/time incompatibility

2010-04-02 Thread Colin Law
On 2 April 2010 05:38, Dudebot wrote: > I've uploaded my development project to my production server, and am > experiencing an odd effect. > > All database find methods in which the date is passed as a param are > coming up nil -- it seems that there's an incompatibility in the date/ > time format