similar to: state_models plugin and file_column?

Displaying 20 results from an estimated 1000 matches similar to: "state_models plugin and file_column?"

2006 Apr 25
7
[TIPS] File_column plugin and multiple file uploads
No..i am not a full time rails developer...i code in pl/sql for paying my bills...and i am just working on a pet project...so i had some trouble in doing..what i specify in the subject.....now somehow i solved this problem...so those interested can look at the code at: http://hemant.wordpress.com/2006/04/25/file_column-and-how-the-fuck-it-handles-multiple-files/ I write this mail and
2006 Jan 17
3
file_column :root_path question.
I''m developing on Windows and deploying to FreeBSD+lighttpd using Switchtower and I''ve got things generally working. My problem now is that file_column data gets zapped every time I deploy, because Switchtower creates a whole new myapp/public directory with each rev. I looked through the file_column docs and found the :root_path option, which I use in my models as follows:
2006 Mar 29
7
Uploading files and writing them to server?
Where should I look for information on how to use Rails and Ruby to accept the upload of a file and then to save that file to the file system of my server? I''m reading the "Uploading a file" section of Agile Web Dev with Rails, but it''s geared toward saving the file in the database. Any advice? Thanks, Jeff -- Posted via http://www.ruby-forum.com/.
2009 May 13
2
Object and Classes ?
I found a tutorial for creating classes using generic functions ? S3 way ! It was short description so I couldn't grok in full its usage ... So far so good, what i currently do is something like this : Blah <- function(data,...) UseMethod('Blah') Blah.default <- function( ...... ) { self = .... class(self) <- 'Blah' self } Blah.some_method <-
2006 Feb 15
2
extending rails via /lib - problems
I wanted to group some functions which I use in some models in one place. Controllers have application.rb and views have helpers but I couldn''t find anything about models. Using the /lib directory seemed to be the only way. Alright... so I have something like this: /lib/code.rb class ActiveRecord::Base def method_a(n) ....... end def method_b(n) ........ end end
2006 Jul 12
1
When to use Mutex::synchronize?
I have a simple question when to the synchronize method in the Mutex class. Now that backgroundrb has allow_concurrency = true there is no need to synchronize database calls in threads. The question I have is lets say I have a simple method in my worker as follows: def some_method SomeModel.find_all each do |obj| obj.some_count += 1 obj.save! end end It accesses the database, but
2006 Feb 18
5
Model methods and partial view templates
I have a method in a controller that invokes a render :partial => ''some_partial_view'' In that view, I''m trying to access a method defined in a model, like this; <% for view in @an_array %> <% local_var = view.some_method() %> <% another_var = view.a_column_name %> etc.. I am getting an undefined method error but the model is accessible
2006 May 22
4
RMagick gem problem using Rails and possibly WEBRick...
Hello, I am new to rails but have been having fun so far. Until now. I am sure this is just my inexperience but I have the RMagick gem (ruby gem for using imagemagick manipulation) installed on my machine that I would like to then use in my rails app. I first installed it and tried it out, and it didnt do anything for me, took me a while to realize I needed the windows RUBYOPT
2024 Jan 30
1
R interpreting numeric field as a boolean field
Incidentally, "didn't work" is not very useful information. Please tell us exactly what error message or apparently aberrant result you received. Also, what do you get from: sapply(your_dataframe, "class") nrow(your_dataframe) (as I suspect what you think it is, isn't). Cheers, Bert On Tue, Jan 30, 2024 at 11:01?AM Bert Gunter <bgunter.4567 at gmail.com>
2006 Feb 16
10
Ruby class variables and access from view templates
I have an app that requires me to define a class variable (actually an array) in a controller and then access it from within a view. It seems that the class variables aren''t working right. Here is an example of what I''m trying to do. class DisplayController < ApplicationController @@thumbnail_array = Array.new ... def some_method @@thumbnail_array = SomeModel.find_all
2024 Jan 30
1
R interpreting numeric field as a boolean field
Hi Bert, Below the information you asked me for: nrow(mydataset) [1] 2986276 ######## sapply(mydataset, "class") $`Transit Date` [1] "POSIXct" "POSIXt" $`Market Segment` [1] "character" $`N?mero de Tr?nsitos` [1] "numeric" $`Tar No` [1] "character" $`Beam Range (Operations)` [1] "character" $`Operational Vessel Ranges
2006 Sep 03
9
using highlight from aaf
Hi, I''m trying to use highlight ferret method with trunk aaf and 0.10.1 ferret. In my search display I use: Myindexedclass.ferret_index.searcher.highlight(@query, result_line.id, :content) * searcher is a protected method; how can I access to the searcher from aaf ? * is the doc id in aaf the same as my model id ? * is the first param, query, the string query or the query object ?
2006 Mar 31
6
Split Validations?
I have a single table that two people enter data into. Person A creates the record and I need to specify certain required fields in his form. Person B has a separate form and she fills in additional fields and I need to specify that some of these are required. Since the data is all in one table and since the validations are in the model, won''t Rails complain when person A tries to
2008 Jan 27
2
conditional validation
Hi, How can I validate user info under certain conditions? For example, I just downloaded a plug-in that allows me to validate phone numbers, but what I would like is to only validate the phone number if it is not blank and if the user_type_id field is equal to one. How can I achieve such a validation in my user model? Thanks, - Dave --~--~---------~--~----~------------~-------~--~----~ You
2009 Nov 25
1
implementing soundex algorithm
how can i implement soundex algorithm in rails app?? my database is mysql I want to search a particular table''s data using soundex -- 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
2009 Apr 21
2
validates_uniqueness_of
hello all, i am new to RoR programming and am struck with the functional test whole checking for uniqeness of carriers. If it is not unique,the the bin shudn''t be created.Can someone help me in correcting my code. def test_create_failure_cycle_unique begin num_bins = Bin.count post :create, {:bin => { :carrier => carriers(:A), :cycle => cycles(:one), :name =>
2010 Sep 16
3
Resyful authenticatio current_user in model
Hi, I am using Restful authentication for user authentication. I want the current logged in user object in my model property.rb Problem is current_user is not working on model. How can I fix this I need that? Please help me out. Thanks, Mike -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"
2007 Jun 18
2
weakness of helper?
Hi , It comes to me that helper has some weaknesses: 1) It is hard to test . No easy way to write test code for it. (or Just i didn''t know?) 2) Not easy to reuse it on other controller/view/model. it looks like to that putting the helper code into a model (a fully helper model , or a mixed model) is good practice. However i agree that some html intensive
2012 Sep 04
5
Associations and Math between Models
I''ve setup two models, 1 and 2, that are associated by has_and_belongs_to_many. I''m trying to get an attribute from model_1 to use in a method in model_2. When I use the code below, I get an error saying ''undefined method model_1_id''. What am I missing? Thanks! Model_2.rb Class Model_2 < ActiveRecord::Base ... has_and_belongs_to_many :model_1 def
2006 Jun 13
6
tax a reserved word?
Is tax a reserved word or am I sleep deprived?? I''m working on a shopping cart and have a table called sales_taxes (at first i named it taxes). I get the following error when i load the controller: uninitialized constant SalesTaxis RAILS_ROOT: script/../config/.. Application Trace | Framework Trace | Full Trace