search for: danim

Displaying 20 results from an estimated 27 matches for "danim".

Did you mean: dani
2008 Oct 28
7
aasm callback order?
...lbacks. Unfortunately, I can''t find it and searches don''t seem to help. Does anyone have a reference to a page that shows the callback sequence with Acts As State Machine (the gem)? I think there was a Wiki page on github with this, but I can''t find it. Grrr. Thanks! -Danimal --~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send...
2008 Apr 16
3
Linking to "Next Entry >>" from the current Entry Page
Hi all, I''m trying to link to the "Next Entry >>" from the current entry page (in show.html.erb). Any one know how I would do it? -- 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
2009 Mar 26
1
Turning off the layout in ActionMailer?
...that in my ActionMailer class with a line at the top: layout ''email'' But when I use multipart and have an HTML and a PLAIN file, they both use the layout and thus the plain contains the <div> tag. Is there any way to avoid this? or turn it off in certain cases? Thanks, -Danimal --~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send...
2009 Mar 06
5
ActionMailer Layout on HTML version not Plain Text
I''m sending plain text and html emails by having multiple files for each email I send. For example, for my registration email I have a registration.text.plain.erb file and a registration.text.html.erb file. I want to use a layout for the html version of my emails. In my mailer I put: class AccountsMailer < ActionMailer::Base layout ''email'' ... end
2008 May 15
13
ANNOUNCE: act_as_soft_deletable - new rails plugin for soft deleting / disabling ActiveRecord models
Acts_as_soft_deletable is a rails plugin that provides the ability to soft delete or disable models. When models are destroyed, they will be archived so that they can later be restored easily. Its similar to acts_as_paranoid but uses a different approach that should make it a little more foolproof. See the README at the following url for a better description. github url:
2009 Mar 27
3
ANNOUNCE: Hirb - A gem enhancing your script/console
Hi, I''m announcing Hirb, a mini view framework which enables script/ console to provide custom views. Out of the box your activerecord objects come back as ascii tables. You can also configure your tree-based models to return as ascii trees: Numeric |-- Float |-- Integer | |-- Bignum | `-- Fixnum |-- Date::Infinity `-- Rational I''ve written two tutorials on
2008 Apr 03
3
Overloading and wrapping an association method
Hi all: For example I have: class Color < ActiveRecord::Base belongs_to :ball end class Ball < ActiveRecord::Base has_many :colors end What I want to do is to write a method that: 1. takes the result of Ball#colors, which is an array of Color objects 2. do something with the array 3. return the result but I want to name my method Ball#colors, i.e. I want to overload the generated
2009 Mar 20
1
Getting a Time Zone abbreviation from the full name?
...where myevent.time_zone is the full time zone string): ActiveSupport::TimeZone::ZONES.find{|z| z.name == myevent.time_zone}.tzinfo.current_period.abbreviation.to_s This returns "MST". But there''s gotta be a better way, right? (I just can''t seem to find one) Anyone? -Danimal --~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send...
2008 Apr 11
2
Validating an ActiveRecord object and its has_many :through associations
Considering an object with several has_many :through => associations, what is the ''best'' way to handle validations? As an example: class Student < ActiveRecord::Base # some attrbutes like # :name # :grade # relationships has_many :students_assignment, :dependent => :destroy has_many :assignments, :through => :students_assignment has_many
2008 Apr 04
6
validates_numericality_of :not_equal_to
I have a situation in which I want to validate a number is not zero. Both positive and negative values are acceptable, just not zero. validates_numericality_of has an :equal_to attribute, but I don''t see a :not_equal_to. I have not yet been able to find anyone who has discussed this. I did find information about custom validators, so I am now using a custom validator to check the field
2008 Sep 18
8
handling association changes? What's the best practice?
...ot;? Now, Order #2 is referencing Product #3 via the association but the data in Product #3 is no longer the right data for the Order? I can imagine a number of ways to handle this, but none of them seem ideal. I''m curious what people do in this type of (very?) common scenario. Thanks! -Danimal --~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send...
2008 Apr 10
3
New to ruby, Need help
I''m attempting to make a simple program, just combine two images and output a .jpg file. Here''s what I have: class PicController < ApplicationController require ''RMagick'' def index im1 = Magick::Image.read(''1.jpg'') {self.size = "81x81"}.first im2 = Magick::Image.read(''2-1.jpg'').first result = im1.composite(im2,
2008 Apr 14
9
scientific notation problem
We''re developing a system that''s used for tracking company IPO data and we''re running into a few number storage issues. For large numbers, i.e. numbers greater than 100 million, MySQL insists on storing these as scientific notation. I don''t really have a problem with that but when we want to edit these fields using something like: <% form_for(@company) do
2008 Apr 09
2
sitemap for RoR
Hi all is there a plugin available by which i can generate a sitemap for my site automatically.. I mean when ever a page is added it will get listed in the sitemap? If you have implemented it do let me know thanks dhaval parikh -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google
2008 Jul 17
0
render partial vs. render subtemplate?
...ender partial" option is advantageous as an abstraction of one or many objects and what to do with them. But I''m noticing that my code is starting to have lots of partials and I wonder where subtemplates fit in? Are there some best practicies for partials vs. subtemplates? Thanks! -Danimal --~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send...
2008 Aug 23
1
Route segment ":controller" cannot be optional because it precedes a required segment.
Hi, With this route... map.namespace :admin do |admin| admin.sort ''/:controller/sort/:sort_by/:sort_dir'', :action => ''sort'' end ...I get this message... Route segment ":controller" cannot be optional because it precedes a required segment. This segment will be required. The route works as expected, but the warning is worrying. Any ideas?
2009 Mar 26
0
reverse of simple_format?
Hello! Is there a way to reverse the TextHelper simple_format? I.e. to take some text with <p> tags and <br> tags and convert them into line breaks in a smart way? (smarter than just a regexp that is). TIA! -Danimal --~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send...
2009 Mar 27
0
ActionMailer multipart: html, plain and attachment?
...alternatives. If I explicitly put in "multipart/alternative" (to support the HTML and plain text parts), it won''t show the attachment. Is this a Rails/ActionMailer issue or am I just missing something with how these multipart messages are supposed to be put together? Thanks! -Danimal --~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send...
2009 Nov 26
0
mutistage deployment question...
...ches, meaning: deploying to the staging server will pull from the staging branch only. And likewise from production. Thus, I can''t just merge BugFix + Production, deploy to staging, then if all is well, deploy to production. Perhaps this isn''t the best setup? Thoughts? Thanks, -Danimal -- 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-...
2009 Mar 27
1
using pagination to group pages by attribute value
Hi - I''m trying to group records based on some attribute they or an association of their''s have. The simplest example I could think of to drive my point is this: Assume the following model associations (pardon my butchering of rails) - Faculty has_many :courses Course belongs_to :faculty I want to paginate courses based on the name of the faculty they belong to. The paging