i need to do update pm a updated_by field with a session variable
user on a model after_save.
but accessing session variables from models is supposedly bad
whats the usual best practice for this kinda scenario ?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because
Thanks
totally got lost ploughing thru Userstamp's code
probably a good time for me to start learning some metaprogramming
--
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,
is it possible to fetch the current logged in window user information
for authentication / log in purposes ?
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Ruby
on Rails:
scenario : select distinct years from members and their respective
record count of that particular year.
eg: [{year = 2008 , count = 45123},{year = 2007 , count = 12332} ]
previously , i was using select distinct tochar(datetime) , it ended
up taking quite a while to fetch the records so i
nevermind the above posts
i wasnt paying attention
i created a model Sample
changed code to
class TestApi ActionWebService::API::Base
api_method :get_me, :returns = [Sample]
end
class MarketdataController ApplicationController
...
def poll
Sample.find(:all,:limit =1)
end
i am cloning a current soap server to ruby
and i have zero experience in this soap thing.
i did a wsdl2ruby on the url and generated 3 riles
DriverDataServiceMappingRegistry.rb
DriverDataService.rb
DriverServiceServant.rb
how do i use the files to setup a soap server ?
--
Posted via
class Sampleclass
attr_reader :temp_arr,:temp_hash,:temp_str
def initialize(temp_arr,temp_hash,temp_str)
@temp_arr=temp_arr
@temp_hash=temp_hash
@temp_str=temp_str
end
class TestApi ActionWebService::API::Base
api_method :get_me, :returns = [Sampleclass]
end
class
disregard this section
#[get_indices(),get_stocks(),get_summary(),DateTime.now.to_s]
indices = get_indices()
stocks = get_stocks()
summary = get_summary()
current_time = DateTime.now
tempsnapshot = Snapshot.new(indices,stocks,summary,current_time)
tempsnapshot
has anyone gotten action actionwebservice to work for this config ?
tried instructions from
http://www.texperts.com/2007/12/21/using-action-web-service-with-rails-20/
and got a activate': can't activate actionpack on server startup
--
Posted via http://www.ruby-forum.com/.
problem : i have to develope a app using ajax features and it has to run
in an environment(web tv related) which is very strict about XHTML
compliance.
and ajax codes generated by rails doesnt seem to be compliant.
(they work on normal webpages , but not in the webtv env)
other than writing my
currently iam using FasterCSV to render csv pages
format.csv do
csv_string = FasterCSV.generate do |csv|
# header row
csv @query_result[0].keys
@query_result.each do |x|
csv x.values
end
end
#send it to the browser
11 matches
Mail list logo