Hello everyone,
I'm upgrading one application from Rails 3.1.3 to 3.2.3 and run into a
nasty problem that none of the assets are found (everything worked
great before upgrade). I've investigated for several hours and it
seems that the root of the problem is that the order of initializers
becomes w
Just do SalesFact.first(:include =>
[:on_market_date_dimension, :sale_date_dimension]). Then you can
access dates with sales_fact.on_market_date_dimension and
sales_fact.sale_date_dimension.
On Mar 11, 6:54 am, Fearless Fool wrote:
> Andrius Chamentauskas wrote:
> > Well first of all
Well first of all are you 100% sure you need OnMarketDateDimension and
SaleDateDimension classes? If you don't have any custom logic in them
you should probably remove them and change associations a bit:
class SalesFact < ActiveRecord::Base
...
belongs_to :on_market_date_dimension, :class_name
Hi,
It was probably for old action mailer. You should use
config.action_mailer.smtp_settings
On Mar 10, 8:04 am, Manish Belsare wrote:
> Sir , I want to implement email section in ma web application..
> so i found the method 'server_setting' for it...
> Following is the method:
>
> config.action
Hello all,
I've recently started a project and I wanted to give ruby 1.9 + rails
a chance. Well everything works great, so far haven't encountered any
gem that didn't work (so anyone out there you should give it a try).
There's only one minor glitch: on ruby 1.8.7 loading rails environment
takes 1
What about:
def initialize(source=nil)
source ? xchg_source(source) : xchg_source
end
Or if you prefer longer notation
def initialize(source=nil)
if source
xchg_source(source)
else
xchg_source
end
Or like in your example:
def initialize(source=nil)
return xchg_source unless sourc
On Mar 8, 5:02 pm, Shilo Ayalon
wrote:
> Hi -
>
> I want to enable the user to generate a report based on the database
> used by the application. I have a few related questions:
>
> 1. Assuming my script is called 'create_report.rb' and stored under
> /lib/tasks, how do I execute it from my con
This should help you do that
http://dev.rubyonrails.org/browser/trunk/actionpack/lib/action_controller/session/cookie_store.rb
Basically cookie consists of two parts. First is session data base 64
encoded and then url encoded, second is SHA1 hash of session data and
secret server side password.
Well first of all you will have to create EditBox and TextBlock. Then
create a button passing a block to it. This block should read value of
EditBox.text convert it and store it to TextBlock.text. You should
probably read shoes elements documentation at
http://help.shoooes.net/Elements.html
On F
Hm I'm not sure why does it freeze. You could try max.to_a.last or if
all else fails try just skipping unnecessary lines using while loop
On Feb 3, 3:36 pm, Richard Schneeman wrote:
> >> max = IO.popen("maxima", "w+")
> => #
> >> max.readlines.last
>
> ^CIRB::Abort: abort then interrupt!!
> fr
What about readlines.last?
On Feb 1, 7:40 pm, Richard Schneeman wrote:
> Thanks that did the trick. Do you know if there is an easy way to get
> the last result, or everything without having to do so many "gets"? I
> tried .each and readlines but with not much success. Or at least a way
> to det
Maybe you have rails version configured in environment.rb?
On Jan 30, 5:15 am, drub wrote:
> Howdy all,
>
> Trying to start WEBrick. The error is displayed "This version of
> ActiveScaffold requires Rails 2.2 or higher. Please use an earlier
> version. (RuntimeError)"
>
> "gem list" shows "rai
Pass "w" as second argument: IO.popen("maxima", "w")
On Feb 1, 8:52 am, Richard Schneeman wrote:
> I tried the following but i'm getting errors...am I missing something
> here?
>
> >> f = IO.popen("maxima")
> => #
> >> f.puts "1+1;"
>
> IOError: not opened for writing
> from (irb):7:in `write'
Well since it probably supports command line arguments, you could
always use 'system' method
On Jan 31, 5:22 am, Richard Schneeman wrote:
> I'm looking to write a javascript heavy clientside program with a
> something serverside backend that connects to the free maxima math
> program. I have ext
var1.all(:select => 'var1.*', :include => {:var2 => var3}, :conditions
=> ['var3.something = ?', some_value])
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send em
I think the safest way is to store images outside your public
directory for storing images. Then create (controller and) action to
retrive images using send_data. For example:
@person = Person.find(@params['id'])
File.open(@person.picture, "rb") do |image|
send_data image, :filename => @person.
try:
class Person < ActiveRecord::Base
has_many :vassalships,:class_name=>'Vassalship',:foreign_key=>'master_id'
has_many :vassalship_belongings, :class_name =>
'Vassalship', :foreign_key => 'slave_id'
has_one :master,:through=>:vassalships,:source=>:person
has_many :servants
Maybe your defined rails version in environment.rb is not 2.2.2?
--~--~-~--~~~---~--~~
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@googlegroups.com
To u
Have you tried one click installer for windows?
http://rubyforge.org/frs/download.php/47082/ruby186-27_rc2.exe
You don't need to install rubygems then, you can simply run cmd and
'gem install rails'
--~--~-~--~~~---~--~~
You received this message because you are sub
render :file => ...
On Jan 2, 12:32 am, Jeff wrote:
> I have a client Rails project, and I'd like to create a folder outside
> of the Rails app completely. The client could create vanilla HTML
> files and drop them into the folder. I'd then like to render those
> HTML files as partials against t
1. You could create a partial with code between for and end, not
including them. Then u can render that partial using render :partial
=> 'something', :collection => @projects.
2. dom_id(project) is same as "project_#{project.id}"
3. Try content_tag_for(:li, project, ...) instead of
wrote:
> I am
You need to rename it to index.js.rjs. Check in firebug then if you
get response.
--~--~-~--~~~---~--~~
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@goog
http://m.onkey.org/2007/12/9/namespaced-models seems to be talking
about same problems. You might wanna read it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send
It is for rails 2.2 and i believe they will get updated as new rails
versions are released.
On Dec 25, 7:04 pm, zero0x wrote:
> Thank you very much, it looks great :)
>
> Is this for the latest version - 2.2 ? (Or at least Rails 2)
>
> On Dec 25, 3:09 pm, Davo wrote:
>
> > Hi There,
> > Welcome
Just to make sure you understand: t.integer "ida2a2" does not create
primary key. All it does is create integer column name ida2a2. To
create real primary key use t.primary_key "ida2a2".
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
Can't you just refetch user info from the database?
On Dec 17, 4:02 pm, The Neurochild wrote:
> I forgot to tell you it has to use elements of the form. The delete
> user could be separated from the form, but the Prawn (PDF) button
> functionality must have all the values of the form when someth
Ok so i just upgraded to rails 2.2.2 and now i'm getting error
"Attempt to call private method". I found out that this is because my
planet model has attribute named y, which seems is a private attribute
in ActiveRecord::Base. I guess rails didn't check if it overwrites
private methods before and
Even though i think you should use some known encryption algorythm,
here's translated source (not tested):
require 'digest/md5'
require 'base64'
class String
def ^(value)
rez = ""
self.length.times { |i| rez << (self[i] ^ value[i %
value.length].to_i) }
rez
end
end
def get_rnd_i
For a live clock it doesn't matter if it's PHP/JS or Rails/JS. If you
know working example with PHP/JS then it will work with Rails/JS. Live
clock is just JS script and the only thing it depends on is browser
implementation. Maybe you just have some archaic browser?
On Nov 22, 1:52 am, The Neuroc
How about making two read-write attributes, one for changes and one
for files, in Ticket model. They would be automatically assigned from
params hash (yes you can assign any attribute using params hash, not
only database related fields) and you could use them in after update
method.
On Oct 23, 3:
What about asymmetric encryption algorithms? You could use javascript
to encrypt password using public key, and then this information could
only be decrypted only by using private key, which could be stored
safely in server and used in model for authentication or registration.
I think example of t
I use Netbeans, even though java is pretty slow and not as responsive
as I wished, it has every feature I can imagine and some that I
couldn't.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" gro
32 matches
Mail list logo