similar to: Newbie question about using helpers in controllers

Displaying 20 results from an estimated 1000 matches similar to: "Newbie question about using helpers in controllers"

2006 Apr 19
3
Flex or OpenLaszlo
I''m just wondering if anybody has got any experience in integrating Flex or OpenLaszlo with Rails and which people prefer. I''ve seen some of the tutorials but am pondering which one, if any, I should turn to: http://coenraets.com/tutorials/flexonrails/flexonrails.html http://www.liverail.net/articles/2006/04/16/rubyonrails-1-1-and-flex-2-0-pt-1
2006 Jul 05
2
How do I access the session in a rails plugin?
I''m trying to access the session in a rails plugin, so as to set it as below. 1. module Juggernaut 2. 3. def self.set_channels(chan) 4. session[:juggernaut_channels] = chan 5. end 6. end 7. 8. module ActionController 9. class Base 10. include Juggernaut 11. end 12. end At the moment I get: undefined local variable or method `session'' for
2006 Jan 27
2
distance_of_time_in_words_to_now
any idea how to use distance_of_time_in_words_to_now? -- Posted via http://www.ruby-forum.com/.
2011 Nov 02
4
undefined method `updated_at' for #<Classified:0x686c5e4>
HEllo, I have the following problem with rails, I am new in this...is there anyone who explain to me what´s happens? Thanks See below: NoMethodError in Classified#show Showing app/views/classified/show.rhtml where line #17 raised: undefined method `updated_at'' for #<Classified:0x686c5e4> Extracted source (around line #17): 14: 15: <strong>Date Posted:</strong>
2006 Jul 20
16
Juggernaut Released - (a.k.a Armageddon)
I''ve just released Juggernaut - a plugin for ruby on rails. Check out the site: http://juggernaut.rubyforge.org I?ve also finished a demo that illustrates some of Juggernuat?s capabilities. You can sign up for an account here: http://alexmaccaw.no-ip.info:3500/login/sign_up . It might be a tad slow as it?s running from my home machine. Juggernaut for Ruby on Rails initiates a flash
2010 Sep 07
2
Help on formatting some HAML
I wondered if anyone could help me with turning the following in ERB into HAML. I''m VERY new with HAML: ---- <div class="block-element span-7 colborder"> <span class="rightside blue-hue no_decor"><%= link_to "New Order", new_order_path, :remote => true %></span> <h3>Today''s Activity</h3> <hr>
2013 Jan 02
4
distance_of_time_in_words_to_now
Hi There, As I have learned the hard way, let me discuss my question, idea or feature here before doing actual work on it... distance_of_time_in_words_to_now() seems to be unable to tell if this distance is in the future or in the past. I''d really like to see ''in 5 days'' or ''5 days ago'' depending on, well, if it was 5 days ago or will be in 5
2005 Dec 27
3
created_on & updated_on - helper to display date only
All, My initial list is rather busy. I would like to shorten the created_on and updated_on fields to just display the date, not the time. Best wold be a simple 12/28/05 type of presentation. I''ve found the format helpers in rdoc. (ie. distance_of_time_in_words_to_now ), but none seem to be what I''m looking for. How do I control the date format of a timestamp field? Thanks
2006 Mar 05
2
Sending http post requests
I''m trying to send http post request in the controller to a web address. In my application I''m using ajax to communicate with the controller, and then use the controller to pass the message on to a remote server, something you can''t do using ajax because of browser security problems. Just wondering what the syntax for a http post is in rails. Thanks Alex -- Posted
2006 May 10
3
formatted date down-counter - help!
I''d like to have a count down to a certain date, but display it in words, such as "123 days away" or something. I''m aware of the function "distance_of_time_in_words_to_now()", which will display "about 6 hours" or "12 days" or something like that, but how can I get it to reverse? Pass it a date for future reference, then it will error
2006 Feb 01
1
distance_of_time_in_words_to_now with "ago" suffix
I wanted the distance_of_time_in_words_to_now method to have '' ago'' suffixed to it when the date is in the past, I assumed this would be the default behaviour but apparently not. I know of a REALLY messy way that i could solve this with, but it''s so ugly I can''t be bothered Does anybody have an easy, elegant solution?
2006 Feb 28
6
Log Files in View
Is it possible to display the log files in the view? Thanks in advance. -- Posted via http://www.ruby-forum.com/.
2006 Dec 07
2
backgrounDRb problems with results and MiddleMan
Hi there, I''ve been experimenting with implementing BackgroundDRb in my rails app but am running into some problems. The primary problem I''m getting is in cleaning up worker threads, or getting any kind of response out of worker threads. If try using the response function/hash in my Worker the worker will not execute reporting that response is an unknown variable or function.
2006 Feb 03
2
acts_as_tree counter_cache behavior is different than API docs
Before I file a ticket, I''ll query ya''ll about this: The API docs for acts_as_tree''s counter_cache is to create a database column called "children_count" to hold the counter_cache. I have enabled this option in my model. While writing tests I wrote a test for creating children from the a parent: message = @forum_message["parent"].find child =
2006 Mar 16
2
Arrays of Model Objects, Intersections, Object Identification... ?
Hi all, Hope you can help me with understanding how Ruby / Rails treats arrays full of objects. Let''s say I have to arrays of objects. Both are the same kinds of objects. tomatoes = Fruit.find(:all, :conditions => [ ''tomato = ?'', true], :limit => 10) fruits = Fruit.find(:all, :limit => 10) And I want to create an array of these objects called @my_fruits,
2006 Nov 17
4
acts_as_ferret and searching word docs
I was wondering if it is possible to search word documents using ferret. The actual text in a word document isn''t in a binary format - only the formatting. Surely it would be possible to parse that? -- Posted via http://www.ruby-forum.com/.
2006 Apr 01
15
Ruby on Rails CMS released. Web 2.0, Ajax, etc
Eribium, a content managing system built with rails has been released completely free under the MIT License. http://www.eribium.org/eribium/?p=21 You can find a demo here: http://alexmaccaw.no-ip.info:3000/admin (user and pass are ''demo''). Some of the features include: * Completely Unobtrusive Javascript. * Liquid View, works with pretty much any screen resolution.
2008 May 27
0
How to find Date and Time difference in controller?
Hi, I need a method similar to "distance_of_time_in_words_to_now" to be used in the controller. "distance_of_time_in_words_to_now" methods work only in view. Thanks, Ratnavel. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2006 Apr 06
2
Strange Error at the end of a succesful Migration
HI all, I''ve got a migration that creates a few new tables and populates a bunch of data into those tables from existing models. It works great. As expected. Tables are created. Relationships are made. Everything comes out fine as far as the data goes. But for some reason the migration task ends with this error: rake aborted! negative argument I''ve liberally sprinkled my
2006 Jun 18
2
convert timespan to verbose description
Hi, I always see RoR pages showing the elapsed time like that ''Published 3 days, 23 hour and 5 minutes ago'' ''Published less than 3 minutes ago'' I guess this conversion can be done using a Rails function, however I can''t find it. Does somebody know its name?? Thanks a lot Peter