search for: default_url

Displaying 11 results from an estimated 11 matches for "default_url".

2010 Mar 17
3
Associating a default paperclip image from a different model
Here''s some code, this is my NewsItem model as you can see... class NewsItem < ActiveRecord::Base belongs_to :country has_attached_file :image, :styles => { :original => ''57x57'' }, :default_url => ''/images/football.png'' # has_attached_file :image, # :styles => { :original => ''57x57'' }, # :default_url => self.country.flag.url validates_attachment_content_type :image, :content_type => [...
2006 Jun 17
2
URL based on acts_as_tree using routes
...9;:acts_as_tree'', :controller => ''pages'', :action => ''view'', :acts_as_tree => { :model => Page, :write_url_for => Page.name, :root_id => 0, :default_url => Page.find_by_id(:first) } OR, with a URL prefix such as "pages": map.connect ''pages/:acts_as_tree'', :controller => ''pages'', :action => ''view'', :acts_as_tree => { :model => Page, :wr...
2009 Oct 26
0
[PATCH node] Users can now work with remote libvirt hosts.
...elif page is CONNECTED_PAGE: return self.get_connected_page(screen) + + def process_input(self, page): + if page is CONNECTION_LIST_PAGE: + logging.info("Changing libvirt connection to %s" % self.get_selected_connection()) + libvirtworker.set_default_url(self.get_selected_connection()) + self.get_libvirt().open_connection(self.get_selected_connection()) + elif page is CONNECTED_PAGE: self.set_finished() + + def page_has_next(self, page): + if page is CONNECTION_LIST_PAGE: return self.has_selectable_connections() +...
2009 Dec 03
1
Rebased against next...
This set of patches have been rebased since the originals have grown stale.
2009 Nov 11
1
Combined patch set for migration...
This patch set includes both the host configuration patch and the node migration patch which depends on it. And the latter has a fix for missing files.
2009 Oct 28
1
[PATCH] Users can now work with remote libvirt hosts.
...elif page is CONNECTED_PAGE: return self.get_connected_page(screen) + + def process_input(self, page): + if page is CONNECTION_LIST_PAGE: + logging.info("Changing libvirt connection to %s" % self.get_selected_connection()) + libvirtworker.set_default_url(self.get_selected_connection()) + self.get_libvirt().open_connection(self.get_selected_connection()) + elif page is CONNECTED_PAGE: self.set_finished() + + def page_has_next(self, page): + if page is CONNECTION_LIST_PAGE: return self.has_selectable_connections() +...
2009 Dec 08
2
Rebased patches, fixed a rebasing problem...
The previous patch set had an error and one development branch's changes showed up twice, and two different change sets. So it was missing the bulk of the configuration work. This patch set fixes that.
2009 Jul 07
2
paperclip unit testing
Hi, Rails 2.3.2, paperclip 2.2.9.2 How can I unit test my model that has a paperclip attachment? I add to my model: --- CODE START --- has_attached_file :image, :default_url => '''' attr_protected :image_file_name, :image_content_type, :image_image_size --- CODE END --- Than I type a UNIT test: --- CODE START --- foo=FooModel.new({:image => File.new(''test/fixtures/img/an_image.gif'')}) --- CODE END --- This works fine until......
2009 Aug 02
1
Provide missing image
Hi I have an application where people can upload avatar-like images to the site. When I show the images I want to show a placeholder image if no image has been uploaded for that user. I was thinking of overloading the image_tag helper to check for existance and provide :default => "path/to/default/image" for the image to show in case the primary one does not exist. So my questions
2010 Feb 11
1
[PATCH] Provides a reference implementation management server.
...f setuptools, set a download +mirror, or use an alternate download directory, you can do so by supplying +the appropriate options to ``use_setuptools()``. + +This file can also be run as a script to install or upgrade setuptools. +""" +import sys +DEFAULT_VERSION = "0.6c7" +DEFAULT_URL = "http://pypi.python.org/packages/%s/s/setuptools/" % sys.version[:3] + +md5_data = { + 'setuptools-0.6b1-py2.3.egg': '8822caf901250d848b996b7f25c6e6ca', + 'setuptools-0.6b1-py2.4.egg': 'b79a8a403e4502fbb85ee3f1941735cb', + 'setuptools-0.6...
2010 Feb 17
0
[PATCH] Provides the new node lifecycle events.
...f setuptools, set a download -mirror, or use an alternate download directory, you can do so by supplying -the appropriate options to ``use_setuptools()``. - -This file can also be run as a script to install or upgrade setuptools. -""" -import sys -DEFAULT_VERSION = "0.6c7" -DEFAULT_URL = "http://pypi.python.org/packages/%s/s/setuptools/" % sys.version[:3] - -md5_data = { - 'setuptools-0.6b1-py2.3.egg': '8822caf901250d848b996b7f25c6e6ca', - 'setuptools-0.6b1-py2.4.egg': 'b79a8a403e4502fbb85ee3f1941735cb', - 'setuptools-0.6...