As per your post, if you want to print page of application through rails
than just give javascript:window.print(); on any label onclick.
It will pop up the printer window & based on your printer selection. you
get print of page content.
Hope this will help you.
Thanks,
Priyanka Pathak
--
Pos
Sebastian von Conrad wrote:
> Vishnu,
>
> What's wrong with using "ID" as the primary key instead of
> "ordernumber"? I would strongly advise doing so; you will most likely
> save yourself (and others) current and future headaches by adopting
> this practice.
>
> Best regards,
> Sebastian
>
> O
Maybe this stuff is interesting:
http://www.georgemendoza.name/2009/08/simplify-sending-emails-in-rails.html
2009/11/2 Tushar Gandhi
>
> Hi,
> I am using rails 2.2.
> I want to send out an email through my application.
> Can anyone tell me How should I configure the email sever or what are
> se
Tushar Gandhi wrote:
> Hi,
> I want to do printing in ROR?
> How should I do that?
> Is there any API's are present?
> Any help appreciated?
> Thanks,
> Tushar Gandhi
Want to print content of the page?
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~---
Conrad Taylor wrote:
> On Sun, Nov 1, 2009 at 10:07 PM, Tushar Gandhi <
> rails-mailing-l...@andreas-s.net> wrote:
>
>>
>> Hi,
>> I want to do printing in ROR?
>> How should I do that?
>> Is there any API's are present?
>> Any help appreciated?
>> Thanks,
>> Tushar Gandhi
>>
>
> Please explain w
Hi,
I am using rails 2.2.
I want to send out an email through my application.
Can anyone tell me How should I configure the email sever or what are
settings required for this?
Any help appreciated.
Thanks,
Tushar Gandhi
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~-
On Sun, Nov 1, 2009 at 10:07 PM, Tushar Gandhi <
rails-mailing-l...@andreas-s.net> wrote:
>
> Hi,
> I want to do printing in ROR?
> How should I do that?
> Is there any API's are present?
> Any help appreciated?
> Thanks,
> Tushar Gandhi
>
Please explain what you mean by printing.
-Conrad
> --
Hi,
I want to do printing in ROR?
How should I do that?
Is there any API's are present?
Any help appreciated?
Thanks,
Tushar Gandhi
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
On Sun, Nov 1, 2009 at 7:51 PM, Conrad Taylor wrote:
> On Sun, Nov 1, 2009 at 7:16 PM, Tony Primerano <
> rails-mailing-l...@andreas-s.net> wrote:
>
>>
>> The Cache Money page (http://github.com/nkallen/cache-money) mentions
>>
>> "For your unit tests, it is faster to use a Memcached mock than th
Hi Al
I have implemented savage_beast plugin successfully. But when I create
new forum it gives me error like "undefined method `title' for
"
In the code, there is no field named as "title"
Help me out of it to solve this.
Thanks all...
--
Posted via http://www.ruby-forum.com/.
-
tommy xiao wrote:
> read rails doc,there is one noticed thing.
>
> {:disabled =>'restricted'} is valid hint
> 'restrcted'must be select value,can imply disabled function.
>
> eg:
> <%= select("message", "id", Message.all.collect {|p| [ p.title, p.id
> ]
> }, { :disabled => 16 })
> %>
>
read rails doc,there is one noticed thing.
{:disabled =>'restricted'} is valid hint
'restrcted'must be select value,can imply disabled function.
eg:
<%= select("message", "id", Message.all.collect {|p| [ p.title, p.id ]
}, { :disabled => 16 })
%>
and view render code:
test sele
Hi,
I was trying to get virtual attributes working for a model...but looks
like with models generated by nifty_scaffolding
the "unknownattribute" exception gets silently eaten ... can someone
please tell me how to get it working.
--
Regards,
Kashyap
--~--~-~--~~~---~
> I hope the following example would help you.. If not put your code
> here..
>
> Example:
>
> select("post", "category", Post::CATEGORIES, {:disabled =>
> 'restricted'})
>
> could become:
>
>
>
> joke
> poem
> restricted
>
Thanks for your reply..
But this code doe
Looks like http://www.redhillonrails.org has been taken over by ads
and considering how old the RedHill plugins are getting I was
wondering if people are still using the RedHill foreign_key_migrations
plugin to setup foreign key relationships? If not what are people
using to replace it?
Thanks,
it seems ---<%=image_tag(url_for
(:controller=>:projects,:action=>:find_db_file,:id=>p.id))-%>---
does not display the image but the image's alt words.when i right-
click the alt words to check the image,i get the the url for the
find_db_file action.Is this problem related with the databas
On Sun, Nov 1, 2009 at 7:16 PM, Tony Primerano <
rails-mailing-l...@andreas-s.net> wrote:
>
> The Cache Money page (http://github.com/nkallen/cache-money) mentions
>
> "For your unit tests, it is faster to use a Memcached mock than the real
> deal."
>
> Faster is fine but will it work with memcach
ActiveSupport::SecureRandom.hex(64) can generate session key
2009/11/2 James West
>
> That works for one site but with multiple sites each key should be
> unique so I need it to be set dynamically otherwise people visiting site
> one will have the same key for site 2, site 3 and so on...
>
> But
hi
content_type and filename fields are in another table called
project_snapshots.I do it according to the attachment_fu plugin
struction.I can just not display the image in the databse.
On Nov 2, 12:53 am, Gregory Mazurek wrote:
> I don't know exactly what errors you are seeing but...
>
> On
Vishnu,
What's wrong with using "ID" as the primary key instead of
"ordernumber"? I would strongly advise doing so; you will most likely
save yourself (and others) current and future headaches by adopting
this practice.
Best regards,
Sebastian
On Oct 31, 4:15 pm, Vishnu First
wrote:
> hi,
>
>
The Cache Money page (http://github.com/nkallen/cache-money) mentions
"For your unit tests, it is faster to use a Memcached mock than the real
deal."
Faster is fine but will it work with memcached? It doesn't work with
mine, I suspect the cache is not cleared between tests. I suspect this
is j
On Sun, Nov 1, 2009 at 5:54 PM, Rick wrote:
>
> I just checked and will_paginate v2.2.2 is being served by
> http://gems.rubyforge.org while mislav-will_paginate v2.3.11 is being
> served by http://gems.github.com. Conrad's point is good for the
> future but right now you should check your .gemr
OK! I figured it and and share below to help anyone else who comes
across this problem...
I created a JS fxn to translate the selected checkboxes into query
string parameters that Rails will read as params.
function getSelections(collectionName, className)
{
paramsString = ""
bo
I just checked and will_paginate v2.2.2 is being served by
http://gems.rubyforge.org while mislav-will_paginate v2.3.11 is being
served by http://gems.github.com. Conrad's point is good for the
future but right now you should check your .gemrc file (that's
~/.gemrc).
Mine looks like this:
---
:
On Sun, Nov 1, 2009 at 1:10 PM, Max Williams <
rails-mailing-l...@andreas-s.net> wrote:
>
> I've just reinstalled linux (9.10) and am trying to match my gem
> environment to our server's. I'm having a problem with will_paginate.
>
> On the server, under gem list, i have "mislav-will_paginate (2.3
That works for one site but with multiple sites each key should be
unique so I need it to be set dynamically otherwise people visiting site
one will have the same key for site 2, site 3 and so on...
But I'm still struggling with the session issue so I'll worry about the
key later.
JDevine wro
andkjaer wrote:
> Hi Marnen,
> Thank you for the answer, colud you please explain this a little bit
> more: "It may be the right way to use the Twitter gem, but it's the
> wrong way
> to use Rails."
>
I mean that -- as detailed in my earlier post -- you're not really
putting things in the best p
Honestly I don't have experience with that, or even know exactly what
the key does, but I suspect that you would want the key to remain the
same for the life of the app, so you really don't want to set it
dynamically. Otherwise, every time you make a change to the app your
sessions would all be in
Aaron Feng wrote:
>> I have installed version 2.3 following the tutorial and I still face
>> the same issue
>
> I had exactly the same problem, but I resolved by putting "require
> will_paginate" on the _last_ line of the of the environment.rb. Before
> I
> had it in the beginning of the file,
Hi everyone,
Am a newbie in RoR. I want to develop a rails app, which could search
flight info from my rails app, fetch the flight informations from
various airlines sites(for example; airasia and malaysia airlines).
display those results back in my rails app.
My search module should include the
Hey everyone! I have a problem that's been making me a little nuts.
I would like to use RoR for a upcoming project, but if I can't get
past this hiccup I'm
afraid I'll have to use PHP or Java. Ugh.
The application needs to have a database-per-customer model. So when
I do a Product.find(:all) I
I have a list that is enclosed in a form. Each item in the list has a
checkbox, so an excerted bit of the code is (the part to list the
contacts is really in a partial):
<% form_tag fxn_for_selected_contacts_path, :method => :put do %>
...
<%= for contact in @contacts do %>
<%=
Greg Donald wrote:
> cd /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7
> gem install mysql --
> --with-mysql-config=/usr/local/mysql/bin/mysql_config
> --
> Greg Donald
> http://destiney.com/
Worked for me too.
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---
Hi Rick
I already tried
gem install mislav-will_paginate
but gem comes back saying it can't find it.
What's odd is that i'm installing it following the instructions on the
mislav-will_paginate homepage, wherer they say to do "gem install
will_paginate", after setting the gem source. So, it'
Eric wrote:
> Just that in 10 months of asap you could have implemented any of:
>
> http://stackoverflow.com/questions/231741/qr-code-2d-barcode-coding-and-decoding-algorithms
>
> Nothing personal, just sayin'. And yeah, there seem to be any number
> of system call solutions.
Or use JRuby and R
One more point. You said that you followed the instructions for
install - there are three different paths there and I know for a fact
that the "gem install..." version will give you "mislav-
will_paginate". If, however, you build from a tar (or use git clone)
the gemspec delivered will build a g
Just that in 10 months of asap you could have implemented any of:
http://stackoverflow.com/questions/231741/qr-code-2d-barcode-coding-and-decoding-algorithms
Nothing personal, just sayin'. And yeah, there seem to be any number
of system call solutions.
-eric
On Nov 1, 12:09 pm, ckundo wrote:
gem list mislav-will_paginate --remote
*** REMOTE GEMS ***
mislav-will_paginate (2.3.11)
em list will_paginate --remote
*** REMOTE GEMS ***
will_paginate (2.2.2)
My guess is that you do have mislav-will_paginate installed, since
will_paginate is only up to v2.2.2, but you've got an older versio
Greetings!
I'm trying to use Ara's Background Job on Windows and running into a
problem. I've installed it as a gem and added "require 'bj'" at the end
of environment.rb. When I run 'bj setup' i'm getting a "FATAL -- : not
opened for reading (IOError)" message. The line in the stack trace
befo
JDevine - Thank you for the pointers.
I've tracked down the problem.
This app was upgraded from Rails 2.1.2 to 2.3.2
The session handling changed between these versions and the :secret was
moved to the config/initializers/session_store.rb
This obviously does not exist so I have created one wh
Successful troll is successful.
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send
In your environment.rb, inside the initializer block use this:
config.gem 'mislav-will_paginate', :lib => 'will_paginate'
That will tell rails to look for the will_paginate library inside the
mislav-will_paginate gem, and you should be fine.
Max Williams wrote:
> I've just reinstalled linux
Hi Brent, thanks for replying.
I already have that line as it happens -
config.gem 'mislav-will_paginate', :version => '~> 2.3.2', :lib =>
'will_paginate', :source => 'http://gems.github.com'
I think the problem is that i don't have the mislav-will_paginate gem, i
have the will_paginate gem.
I've just reinstalled linux (9.10) and am trying to match my gem
environment to our server's. I'm having a problem with will_paginate.
On the server, under gem list, i have "mislav-will_paginate (2.3.6)".
So, i'm trying to install that locally. Following the instructions on
the will_paginate pa
Hi Marnen,
Thank you for the answer, colud you please explain this a little bit
more: "It may be the right way to use the Twitter gem, but it's the
wrong way
to use Rails."
On 1 Nov., 18:56, Marnen Laibow-Koser wrote:
> andkjaer wrote:
> > Hi Railer's,
> > Im pllaying around with the Twitter API
Eric: Why so incredulous? My point is that I'd rather prototype
something quickly for user testing before I try learn a completely new
language.
To anyone else interested: I found out how to execute java using %x|
java ...| . I think latency would be an issue in the scenario I'm
describing, but I
This... is true... I am an idiot.
Thank you.
--
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 email to rubyonrails-t
I am trying to build a shared-appointment system, where users can
subscribe to appointments and be updated whenever changes are made to
them. I have three objects in this system, appointments, users, and
subscribers. Subscribers are a polymorphic object like so:
class Subscriber < ActiveRecord::
I've written a Textmate plugin that indents Ruby code (rather better
than Textmate does on it's own but not as well as Netbeans which, as
mentioned earlier in the thread does a great job).
It's all written in Ruby so would be easy enough to extract into a gem
(it's on my to do list).
You can
If you can use find_by_sql try this:
Stream.find_by_sql(
["select streams.* from streams join
(select stream_id, count(*) from postings
where created_at > :one_day_ago
group by stream_id
order by count(*) desc) subq
on streams.id = subq.stream_id ",
{:one_day_ago=>1.day.ago}]
cool - thanks for the advice...
I'll check out paper clip...
Is it easy to figure out?
On 1 Nov, 19:19, AGoofin wrote:
> No need to reinvent the wheel with file uploads, I've used PaperClip
> to handle uploaded images and files with little trouble.
>
> It's very easy to configure as to where t
You have a naming mismatch between "BaseDetail" and "BasicDetail"
On Nov 1, 1:39 pm, James Cook
wrote:
> I am working on a project that involves many different types of users,
> each with their own sets of information. I decided to condense the
> variety of users into a single class to deal with
On Sun, Nov 1, 2009 at 4:35 PM, Ernesto Rocha wrote:
> hi guys,
>
> I'm trying to do a program that automates some site usage, like fetch the
> site, fill a field and "press" the send button. So, it'll behave like a real
> browser. Is there a plugin out there ready to work ? Or, then, how can i
>
I am working on a project that involves many different types of users,
each with their own sets of information. I decided to condense the
variety of users into a single class to deal with things like logging
into the site, and use single table inheritance to account for the rest
of the logic. Sinc
hi guys,
I'm trying to do a program that automates some site usage, like fetch the
site, fill a field and "press" the send button. So, it'll behave like a real
browser. Is there a plugin out there ready to work ? Or, then, how can i
make a simple browser, what's the necessaries libraries ?
Thank
If you have time, please share your solution. I had a similar problem
a while back, and ended up just using ActionMailer and creating a mail
object and extracting the body. Other solutions required too much
including different ActionView and ActionController modules ad
nauseum.
On Oct 31, 8:21 am
First thing I'd do is run in development mode and double check what
sql statements are being sent to the database to find those sessions.
I've been working only with cookie sessions, so naturally I'd suspect
that.
Then place a debugger statements here:
def find_cart_from_session
debugger
No need to reinvent the wheel with file uploads, I've used PaperClip
to handle uploaded images and files with little trouble.
It's very easy to configure as to where the information gets stored -
in the database or out.
On Oct 31, 8:47 am, RubyonRails_newbie
wrote:
> Hi Everyone!
>
> I'm tryin
I wouldn't limit your question to seasoned developers :)
While I wouldn't consider myself seasoned - I've written a few apps
for local use and am getting ready to publish an open source RoR app,
I don't even know how little I know.
Rails makes life easier by it's basic core principles -
Convent
I have a really horrendous problem with sessions.
before_filter :find_cart_from_session
private
def find_cart_from_session
if session[:cart] # if there's is a cart in the session
begin
@cart = Cart.find(session[:cart]) # return existing or new cart
rescue ActiveRecord::Re
Marnen;
> Hold it. Banish the phrase "will never understand $TECHNOLOGY" from
> your coding vocabulary. Good programmers must remain open to learning
> new things
Thank you for calling me on that. I appreciate and agree with the
point you make, and regret writing what I had intended to be read
andkjaer wrote:
> Hi Railer's,
> Im pllaying around with the Twitter API wrapper by John Nunemaker, but
> i'm wondering where to put all the logic.
> It can't find any examples with this code built into rails.
>
> What im doing now is like this, by the way Im pretty new to rails and
> ruby:
>
>
Steve Nelson wrote:
[...]
> And I wish to use jQuery because... well, because I understand jQuery
> in a way I will never understand prototype, and I'm already using
> jQuery extensively in my app.
[...]
Hold it. Banish the phrase "will never understand $TECHNOLOGY" from
your coding vocabulary.
Thanks a MILLION Bryan!
Will be sure to look into your case study. I'm grateful.
Steve
--~--~-~--~~~---~--~~
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-tal
Greg Donald wrote:
> On Sun, Nov 1, 2009 at 10:14 AM, Marnen Laibow-Koser
> wrote:
>> Impressive. �Is that xemacs + Cygwin, or what?
>
> That's plain old Emacs 23.1 on Windows 7.
>
> http://ftp.gnu.org/pub/gnu/emacs/windows
Interesting. The last time I ran Emacs in a graphical environment, it
I don't know exactly what errors you are seeing but...
On Sun, Nov 1, 2009 at 11:05 AM, daociyiyou wrote:
>
> db
> def self.up
>create_table :db_files,:force => true do |t|
> t.binary :data
> t.timestamps
>end
> end
> db---
>
I bet one of them is due to your not having
Frederick Cheung wrote:
> On Oct 31, 7:40�am, Bryce Covert
> wrote:
>>
>> This is a difficult thing to describe. Maybe a better way of saying it
>> that I want to make sure that there is only one instance per row of an
>> object so that the runtime properties are always available.
>
> That's som
On Sun, Nov 1, 2009 at 10:14 AM, Marnen Laibow-Koser
wrote:
> Impressive. Is that xemacs + Cygwin, or what?
That's plain old Emacs 23.1 on Windows 7.
http://ftp.gnu.org/pub/gnu/emacs/windows/
--
Greg Donald
http://destiney.com/
--~--~-~--~~~---~--~~
You rece
Hi,
I have a long list (~50) of items which should each be clickable and
will send an Ajax request to the server. Now, each item will be calling
the same action, just with a different id.
Ideally this looks like a clear case of putting the Ajax javascript in
application.js. It's in one place, ju
Greg Donald wrote:
> On Thu, Oct 29, 2009 at 4:31 PM, Marnen Laibow-Koser
> wrote:
>>> I agree, there's nothing as powerful as Emacs. �I have yet to find
>>> something it can't do.
>>
>> Display an attractive GUI? �Or have things changed?
>
> Looks really nice to me:
>
> http://static.destiney.
db
def self.up
create_table :db_files,:force => true do |t|
t.binary :data
t.timestamps
end
end
db
controller
def find_db_file
project=Project.find_by_id(params[:id])
project_snapshot=project.project_snapshot
send_data(project_snapshot.db_file.data
Hi,
I'm trying to change my authlogic configuration at runtime like follows:
def save_without_session_maintenance_and_allow_blank_password
return false if facebook_uid.blank?
object = Mutex.new
tmp = nil
object.synchronize do
User.validate_password_field false
tmp
On Oct 31, 2:48 pm, David Sousa
wrote:
> Hello there,
>
> I'm using AASM to manage states in my User model.
>
> I want to change the status through the edit action.
> To do this I'm using the method User.aasm_states_for_select in my form
> to populate the select input for states.
> When I hit t
A couple things:
- Railsspace isn't the best tutorial to start with - the ideas are
good, but trying to update a 1.2.3-era tutorial to present isn't the
most helpful. It also re-implements a lot of things that have mostly
been rolled into popular plugins (authentication for one; also this
whole i
Not specifically what you're looking for, but have you looked at
Hoptoad? It's a pretty handy way to track exceptions in production,
and involves a lot less work than trying to roll up your own.
--Matt Jones
On Oct 31, 10:41 am, cduv wrote:
> Hi,
>
> I will like to trap all application exceptio
On Sun, Nov 1, 2009 at 11:27 AM, Saravanan Krishnan
wrote:
>
>
> Why dont you go for SciTE editor. It is simple and powerful
...becase my editor is simple and powerful and I'm happy with it?
--
Leonardo Mateo.
There's no place like ~
--~--~-~--~~~---~--~~
You r
Yeah, I've viewed the source. The response is literally an empty
string. No content at all.
On Nov 1, 8:27 am, Colin Law wrote:
> 2009/11/1 NewMonarch :
>
>
>
> > Hey guys. I've a pretty experienced Rails developer, but I've never
> > seen this one before. I'm not getting my custom error pag
I have had success with simple_auto_complete[1]
I wrote a blog post[2] with the steps I went through using it.
Hope this helps,
Bryan
[1] http://github.com/grosser/simple_auto_complete
[2] http://bryan-ash.blogspot.com/2009/06/using-simpleautocomplete.html
--~--~-~--~~~-
On Oct 31, 8:47 am, RubyonRails_newbie
wrote:
> Hi Everyone!
>
> I'm trying to add the avatar upload functionality in Ruby on rails
> following the railsspace book.
>
Check the book's website for errata: http://railsspace.com/book/errata
There is also a Google Group dedicated to the book:
htt
The ecosystem. So many smart people, building upon each other's tools
and techniques.
On Oct 30, 1:47 pm, Dustin wrote:
> What do seasoned developers really enjoy about Rails. How does it make
> your life easier?
>
> This is for favorites, not what you don't like.
>
> Thanks,
> Dustin
--~--~
2009/11/1 NewMonarch :
>
> Hey guys. I've a pretty experienced Rails developer, but I've never
> seen this one before. I'm not getting my custom error pages to serve
> up under Passenger. They worked just fine in an earlier version of my
> app, but somewhere along the way, they stopped working.
Why dont you go for SciTE editor. It is simple and powerful
--
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 email t
Brijesh Shah wrote:
> Hi
>
> I want to disable only one item of select box.
>
> I tried to used :disabled=>'item' but it disable select box itself.
>
> So anybody how to do this?
>
> Thanks
> Brijesh Shah
Hi Brijesh,
I hope the following example would help you.. If not put your code
here..
Hey guys. I've a pretty experienced Rails developer, but I've never
seen this one before. I'm not getting my custom error pages to serve
up under Passenger. They worked just fine in an earlier version of my
app, but somewhere along the way, they stopped working. Instead, I'm
just seeing a blan
The most excellent nested has_many though lets you do what you want.
http://github.com/ianwhite/nested_has_many_through
best regards,
Tor Erik Linnerud
http://tel.jklm.no/
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message
eduardopa wrote:
> Hi,
>
> I am following the hivelogic article to compile ruby on snow leopard.
> http://hivelogic.com/articles/compiling-ruby-rubygems-and-rails-on-snow-leopard/
Do you have a particular reason for wanting to do it this way? If not,
then forget about Hivelogic and use Apple's
86 matches
Mail list logo