similar to: how to get image properties

Displaying 20 results from an estimated 1000 matches similar to: "how to get image properties"

2006 Apr 07
6
Multiple view types for a single action?
Is it possible to have more than one kind of view for a specific action, for example an .rhtml and a .rjs file to handle the view for the same action? I suspect not, but this makes me wonder if there a way to call the .rjs file from within the .rhtml so the statements within it get executed? Thanks, Andy
2006 Apr 08
5
What is the h for?
In the "Agile Web Development with Rails" book it runs through making an example application, a shopping cart. In one of the views files, there is one line of code I dont understand (below), I dont know what the "h" is for, also I took the h out, and it did not affect the application (as far as i could see). <%= h(product.title) %> Can anyone shed some light on this
2006 May 19
5
How to determine if an object has just been created
Is there a built-in way to determine if a model object has just been created (ie. this object was the one that was originally persisted)? I can''t see it anywhere in the AR code, but thought I''d check. I want something like: p = Person.create p.original_instance? # true Is this built-in or should I just patch AR? -Jonathan.
2006 Apr 01
3
Determine image width of png, gif or jpg?
Hi all In PHP I have a neat function: http://ch2.php.net/function.getimagesize With it I can easily determine the dimensions of an image file. How can I do that in RoR? Thanks for help. Greets, Josh -- Posted via http://www.ruby-forum.com/.
2010 Feb 26
2
Fwd: how to install rmagick on fedora please help urgent
hi all i want to run project at local system ..see this i m getting some error http://pastie.org/843746 and when i run server http://pastie.org/843748 plz tell me how to install rmagick on fedora Regards, Shyam +91-9716-18-9650 -- 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
2006 Jul 24
2
Flash problem with RoR? missed something?
I have tried to put a flash movie inside of my RoR page and it shows up with nothing on IEPC. It does very well on every other type of browser but does not work with IEPC. I made a folder - "flash" in my public directory and have had the one instance of it point there. Thus my flash directory is www.rails-app.com/flash/flash.swf Is there anything that anyone knows to help out?
2006 May 23
2
Ordinalizing a date
I''m trying to use the ordinalize() method to ordinalize a day. Here''s how far I''ve gotten: @reportday = Time.now.at_beginning_of_week.strftime("%d").to_i @ordinalized_reportday = "#{@reportday}".ordinalize I was thinking it wasn''t working because the date is being returned as a string, however I added the .to_i and still it returns an
2006 Jul 15
4
routing requirements broken in Rails 1.1.4?
Hi, I have the following routes map.connect '':controller/:id/:action'', :id=>/4/, :defaults=>{ :action=>''show''} map.connect '':controller/:action'', :defaults=>{:action=>''index''} and when I point my browser to "localhost:3000/departments" I see an error because the show action cannot find a
2007 Mar 21
6
Converting Rails app to desktop with XUL?
Hi, We are thinking about choosing Rails as our weapon of choice for our next project, which is basically a text editor on steroids, whith some functionality that need an Internet connection. In the first step we are going to develop it as a plain web app (AJAX-ified, yay!), however, in the next step we would like to port some of the functionality (such as the editor) to a desktop app (which can
2006 Apr 07
4
How to generate mapping with migration
Hi there, I''ve tried to add a m:n mapping table using the migration mechanism. ruby script\generate migration add_categories_notes_mapping and filled the migration file with: class AddNotesCategoriesMapping < ActiveRecord::Migration def self.up create_table :categories_notes do |t| t.column :category_id, :integer, :null=>false t.column :note_id, :integer,
2006 Jul 18
16
Session is being shared between tabs!!??
I have just spotted quite a serious problem with my rails app. My app uses the session to store information. Most people who use the app may have more than one instance of it open in their browser (multiple tabs). The session stores which country the user has selected. On each browser tab the user may select a different country. You can add items to a country. There are problems with
2008 Jan 31
3
Handling multiple Check boxes in a XHTML Strict way
Hi, The default way we handle an array of checkboxes is like this: <% items.each do |item| %> <%= check_box_tag ''item[]'', "#{item.id}" %> <% end -%> this returns an array item[] that holds the ids of all the items. Now the real issue: 1. The above loop will same ids to ''n'' items 2. All ids will be ''item[]''
2007 Feb 28
6
DRY question - image_tag :alt and :title the same
Hello, I have the following: image_tag(''show.png'', :alt => ''show article'', :title => ''show article'', :border => 0) Is it possible that I donĀ“t need to have "=> ''show article''" twice in this row? e.g. something similar to this pseudo code: (:alt, :title) => ''show article''.
2009 Feb 24
7
Add .html extension by default
Hi all, i would like to add the .html extension by default to all my resources. What is the best way to do that? The reason for this is that i need to download the generated sites via wget and i need the .html extension for the downloaded files. Also it would be nice if the link_to would automatically generate the links with .html... Thanks, Gerold
2006 Apr 05
7
select_tag - populating options
Hello, I want to a select tag, where you can choose a number between 1 and 100. My inital code is based on the examples from Agile Web Development with Rails, and looks like this: view: <%= options = [["Select number of lines", ""]] + RfqLines::LINE_QTY select("rfq_line", "line_qty", options) %> model: LINE_QTY = select_fill def
2006 May 03
6
sql server, date and time
Hey there all, Is there some way to tell rails or sql server to ignore the time in a datetime field when doing a comparison? For example, if I do something like select * from users where registration_date = ?, @date where @date might equal some user input like ''03/14/2006'' The result is nothing returned, because in my tables the datetime field looks like this: 3/14/2006
2006 May 16
10
Date verus Time class
I''m using the date_select and datetime_select helpers in my view, and they return Date classes from the params hash. But how do I work with Date classes, they don''t print human readable dates or times, Time classes work well I can use strftime("%H:%M") to print to the screen. Is it possible to convert a Date to a Time, Ive been tinkering in irb but have got
2006 Apr 10
6
image_tag adding request parameter
I have noticed that the image_tag helper method now appends a request parameter to the generated src attribute. With Rails 1.0/actionpack-1.11.2 I had <img src="/images/rss.gif" /> Now (1.1/1.12.1) I get <img alt="Rss" border="0" src="/images/rss.gif?1142366545" /> Is there any use for that number? Where does it come from? This is very far
2006 Sep 15
7
OT: TinyMCE in Rails
I''m having a problem getting the text area the size I want it to be. In my view at the top I have this init calls <script type="text/javascript" > tinyMCE.init({ mode: "textareas", theme: ''advanced'', theme_advanced_toolbar_location: ''top'' }); </script> Then in my form: <%= text_area
2006 Jun 07
3
#5209 patch: :dependent => :nullify deletes child records
Hi everyone, A couple of weeks ago I noticed a bug with :dependent => :nullify on a has_many or has_one. When you delete the parent, the children''s foreign keys are nullified, as expected. But when you do parent.child.delete or parent.children.clear, ActiveRecord actually deletes the child records, rather than just nullifying them. In my eyes, if you''ve set