[Rails] Image Croping in simple way..

2012-01-05 Thread manikyala rao padala
Hi All, From the past two weeks i am working on image croping using ImageMagic,Paperclip gems.It's big headache to install ImageMagic gem.actually i am hosting my site in engineyard.so it's difficult to configure ImageMagic in engine yard. can anyone please give me a suggestion to do image

[Rails] Re: Beginner here: What does it take to find a decent job as Rails developer and live from it

2012-01-05 Thread FaBritze
Hello there! Rails is growing up very fast in the market To give you an idea, here in Brazil there are many opportunities for RoR web development, both in small and in multinational companies and some academic attempts too About employable Rails developer... This is very concerning...

[Rails] How to Send ESC commands to a DOT MATRIX printer in Ruby on Rails?

2012-01-05 Thread sly verano
Guys I need your help. I need to print RAW data to format the settings of the printer. The below data are my example of RAW data... ! HELLO WORLD chr(27) + '!' + chr( 1) ! HELLO WORLD chr(27) + '!' + chr( 2) ! HELLO WORLD chr(27) + '!' + chr( 3) ! HELLO WORLD chr(27) + '!' + chr( 4) !

Re: [Rails] Image Croping in simple way..

2012-01-05 Thread loganathan sellappa
HI Manikyala, This link will be hepful,http://railscasts.com/episodes/182-cropping-images regards, Loganathan On Wed, Jan 4, 2012 at 9:50 PM, manikyala rao padala manikyalaraopad...@gmail.com wrote: Hi All, From the past two weeks i am working on image croping using

Re: [Rails] How to Send ESC commands to a DOT MATRIX printer in Ruby on Rails?

2012-01-05 Thread Michael Pavling
On 5 January 2012 03:04, sly verano slyver...@gmail.com wrote: Guys I need your help. I need to print RAW data to format the settings of the printer. You don't mention whether this printer is connected to the Rails server, a client workstation, or the network. If you're trying to print from

Re: [Rails] Error while rake actions

2012-01-05 Thread Peter Vandenabeele
On Thu, Jan 5, 2012 at 6:08 AM, uma ya li...@ruby-forum.com wrote: rake aborted! /home/Mahesh/uma/myapp/Rakefile:6: unterminated string meets end of file /usr/local/lib/ruby/1.9.1/rake.rb:2373:in `load' /usr/local/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'

Re: [Rails] Error while rake actions

2012-01-05 Thread Peter Vandenabeele
On Thu, Jan 5, 2012 at 9:47 AM, Peter Vandenabeele pe...@vandenabeele.comwrote: On Thu, Jan 5, 2012 at 6:08 AM, uma ya li...@ruby-forum.com wrote: rake aborted! /home/Mahesh/uma/myapp/Rakefile:6: unterminated string meets end of file /usr/local/lib/ruby/1.9.1/rake.rb:2373:in `load'

Re: [Rails] How to create new object with existing nested attributes

2012-01-05 Thread BALA MANI
Hai! When you are using object.new # you need save object.save when you are using object.create #you need to save thy this way:) -- 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

[Rails] How to get all image, pdf and other files links from a website?

2012-01-05 Thread cyber y.
I am working on an application where I have to 1) get all the links of website 2) and then get the list of all the files and file extensions in each of the web page/link. I am done with the first part of it :) now I have to get the all the files/file-extensions in each of the page. Can anybody

Re: [Rails] composite keys and association

2012-01-05 Thread Colin Law
On 5 January 2012 02:53, Daisy Di li...@ruby-forum.com wrote: i have two table, comment and post, both have composite keys, and no id column, comment belongs to post, i follow the instruction of http://compositekeys.rubyforge.org/, and it seems successfully, (But i still cant confirm to put

[Rails] lock the sign in account when login failed more than 5 times

2012-01-05 Thread Daisy Di
Hi all i have two table,member and failed_times,the member table is designed by customer which i cant modify anything, but the failed_times is created by myself.the columns in the failed_times are id,mbr_id,times, now i can calculate the login failed times and save it into failed_times table, but

Re: [Rails] How to get all image, pdf and other files links from a website?

2012-01-05 Thread Peter Hickman
Is it me or has this particular homework question turned up a few times already? Hint: This has been asked and answered before quite recently (yesterday even) so try reading the mailing list. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

Re: [Rails] Re: Beginner here: What does it take to find a decent job as Rails developer and live from it

2012-01-05 Thread Peter Hickman
Experience is good, especially comercial experience of Rails. If you've been doing Rails for 5 years but you are actually employed as a Java programmer you will probably lose to someone who has been employed as a Rails developer for 2 years. It's hard to sell enthusiasm over experience :( --

Re: [Rails] lock the sign in account when login failed more than 5 times

2012-01-05 Thread Colin Law
On 5 January 2012 09:47, Daisy Di li...@ruby-forum.com wrote: Hi all i have two table,member and failed_times,the member table is designed by customer which i cant modify anything, but the failed_times is created by myself.the columns in the failed_times are id,mbr_id,times, now i can

[Rails] Re: Beginner here: What does it take to find a decent job as Rails developer and live from it

2012-01-05 Thread Francisco Lucas
Fabricia, where can I find this opportunities here in Brazil? On 4 jan, 17:43, FaBritze fabricio.e.re...@gmail.com wrote: Hello there! Rails is growing up very fast in the market To give you an idea, here in Brazil there are many opportunities for RoR web development, both in small and in

[Rails] Re: Local Gem Repository will not work

2012-01-05 Thread Holm Dressler
Hi Luis, cool thanks. It works now. Honestly: I spend about 4 hours and read all stuff with generate_index. But at least you gave me the solution. Thanks, Holm -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: very strange haml behavior , display fine w html.erb , not in html.haml

2012-01-05 Thread Kad Kerforn
Colin Law wrote in post #1038772: Have a look at the html of the page (View Page Source or similar in browser) in each case and compare them. They must be different. Colin Thanks Colin .. they were different using HTML, in the iframe src url, I had : maps?ie=UTF8amp;f=qamp;source=s_q

[Rails] Exchanging values of two records with unique-validated fields

2012-01-05 Thread Dmitry Suzdalev
Hi fellows! Is there a way to atomically exchange values of records which are validated using 'validates_uniqueness_of'? Some details follow. Imagine I have a model: class Item ActiveRecord::Base validates_uniqueness_of :weight end 'weight' is a sorting weight. I have an index.html view

Re: [Rails] Exchanging values of two records with unique-validated fields

2012-01-05 Thread Peter Vandenabeele
On Thu, Jan 5, 2012 at 2:35 PM, Dmitry Suzdalev dim...@gmail.com wrote: Hi fellows! Is there a way to atomically exchange values of records which are validated using 'validates_uniqueness_of'? Some details follow. Imagine I have a model: class Item ActiveRecord::Base

Re: [Rails] Exchanging values of two records with unique-validated fields

2012-01-05 Thread Dmitry Suzdalev
On 5 January 2012 18:09, Peter Vandenabeele pe...@vandenabeele.com wrote: If you mean atomic on the level of saving to the database (all or nothing), you would need a database transaction. http://api.rubyonrails.org/classes/ActiveRecord/Transactions/ClassMethods.html Second, to circumvent

[Rails] save pdf to file using template

2012-01-05 Thread Enrico M.
I can create and save a pdf file with: pdf = PDF::Writer.new() pdf.select_font Times-Roman pdf.text Sample PDF Document, :font_size = 32, :justification = :center pdf.save_as(pdffilename.pdf) but I'd like to re-use rpdf template, i I use the following code: pdf_content =

[Rails] Re: rails 3.1 gemfile issues

2012-01-05 Thread Alex Mercer
Use app templates: http://guides.rubyonrails.org/generators.html#application-templates On Jan 5, 7:18 am, amvis vgrkrish...@gmail.com wrote: my system running with rails3.1 version, which i am using for 3 months. But when i create a new application ,Every time i have to changed the Gemfile of

[Rails] assest pipeline how to exclude some css files?

2012-01-05 Thread Mauro
In my assets I have intranet |_1.css.scss |_2.css.scss internet |_1.css.csss application.css application_internet.css application_intranet.css 1.css.scss 2.css.scss 3.css.scss intranet and internet are directories. In my layout I want to exclude the files under internet and intranet. I

[Rails] Duplicate forms after click

2012-01-05 Thread JavierQQ
I'm having a problem with a submit event What I'm trying to do is to update a record using radio inputs... and everything is ok, but when I do a fast double-click on the radio button, the form duplicates and I'm not sure if its a javascript problem or a rails problem cause its rendering the

Re: [Rails] Duplicate forms after click

2012-01-05 Thread Colin Law
On 5 January 2012 16:33, JavierQQ jquari...@gmail.com wrote: I'm having a problem with a submit event What I'm trying to do is to update a record using radio inputs... and everything is ok, but when I do a fast double-click on the radio button, the form duplicates and I'm not sure if its a

Re: [Rails] Duplicate forms after click

2012-01-05 Thread Javier Quarite
On Thu, Jan 5, 2012 at 11:44 AM, Colin Law clan...@googlemail.com wrote: Look in the rails log to see what is happening (development.log assuming in development mode). Once you understand what is happening you will be better placed to fix it. Colin Yes, I've done that and every time I

Re: [Rails] assest pipeline how to exclude some css files?

2012-01-05 Thread Ralph Shnelvar
Thursday, January 5, 2012, 9:25:03 AM, you wrote: M In my assets I have M intranet M |_1.css.scss M |_2.css.scss M internet M |_1.css.csss M application.css M application_internet.css M application_intranet.css M 1.css.scss M 2.css.scss M 3.css.scss M intranet and internet are

[Rails] help with some ugly code: refactoring

2012-01-05 Thread Allen Maxwell
Hi all, I have a user model and associated controller/views. the model has a password field and the security for logging into my site etc. and all of this works pretty well. When i implemented it i had a need to be able to allow users to edit the user data (demographic stuff) and not edit

Re: [Rails] help with some ugly code: refactoring

2012-01-05 Thread Michael Pavling
On 5 January 2012 17:37, Allen Maxwell aa...@xmission.com wrote: I've worked around this by using a bunch of ugly if statements to update each field individually (not elegant but got the job done when i was first learning)  It is UGLY and not robust so i need to refactor (and improve) it.  

[Rails] Re: help with some ugly code: refactoring

2012-01-05 Thread M Daubs
Here is my suggestion. Have your User model ignore attempts to set a blank password: def password=(value) super(value) unless value.empty? end And then change your controller to: if @user.update_attributes(params[:user]) flash[:success] = Profile updated. redirect_to @user else

[Rails] Accessing js from controller

2012-01-05 Thread Peter Klein
Hi! I've been struggling with a ajax/jquery html fraction update for a couple of days now, can't seem to get my head around it. I can't get my update.js.erb file to run, this is how my relevant files look like: The view: div id=menuwrapper div class=tabArea %=

[Rails] Help with Nested Associations Hash in ActiveRecord query

2012-01-05 Thread loominator1970
Hello, Perhaps someone knows the answer to this one, because its been stumping me for a long time. BTW, i'm still using rails 3.0.0, perhaps this issue is solved in a recent release. Here are my Models class Team ActiveRecord::Base has_many :players end class Player

Re: [Rails] Help with Nested Associations Hash in ActiveRecord query

2012-01-05 Thread Craig White
On Jan 5, 2012, at 2:27 PM, loominator1970 wrote: Hello, Perhaps someone knows the answer to this one, because its been stumping me for a long time. BTW, i'm still using rails 3.0.0, perhaps this issue is solved in a recent release. Here are my Models class Team

[Rails] form_for behavior

2012-01-05 Thread MarkMT
Hi, A couple of related questions... On p334 of The Rails 3 Way there's an example that looks like this: form_for :client, person, :url = {:action = update} do |f| which it is claimed allows you to use a different name, 'client' for person in the params hash. I haven't been able to get this

[Rails] js update partial missing template

2012-01-05 Thread Craig White
PermissionsController def add_member ...snip... @permissions = Permission.all respond_to do |format| format.html { flash[:messages1] = @permission.user.name + has been given rights. } format.js end end app/views/permissions/add_member.js.erb

[Rails] Re: Help with Nested Associations Hash in ActiveRecord query

2012-01-05 Thread loominator1970
Awesome, thanks for the help, i appreciate it! Dave On Jan 5, 3:05 pm, Craig White craig.wh...@ttiltd.com wrote: On Jan 5, 2012, at 2:27 PM, loominator1970 wrote: Hello, Perhaps someone knows the answer to this one, because its been stumping me for a long time. BTW, i'm still

Re: [Rails] js update partial missing template

2012-01-05 Thread Bill Walton
Hi Craig, On Thu, Jan 5, 2012 at 4:18 PM, Craig White craig.wh...@ttiltd.com wrote: pMissing template ... :formats=gt;[:html]}. That looks like a clue. Have you checked your request header? HTH, Bill -- You received this message because you are subscribed to the Google Groups Ruby on

Re: [Rails] js update partial missing template

2012-01-05 Thread Craig White
On Jan 5, 2012, at 3:37 PM, Bill Walton wrote: Hi Craig, On Thu, Jan 5, 2012 at 4:18 PM, Craig White craig.wh...@ttiltd.com wrote: pMissing template ... :formats=gt;[:html]}. That looks like a clue. Have you checked your request header? I think so... I've been staring at firebug

Re: [Rails] js update partial missing template

2012-01-05 Thread Bill Walton
On Thu, Jan 5, 2012 at 4:44 PM, Craig White craig.wh...@ttiltd.com wrote: On Jan 5, 2012, at 3:37 PM, Bill Walton wrote: Hi Craig, On Thu, Jan 5, 2012 at 4:18 PM, Craig White craig.wh...@ttiltd.com wrote: pMissing template ... :formats=gt;[:html]}. That looks like a clue.  Have you

Re: [Rails] js update partial missing template

2012-01-05 Thread Craig White
On Jan 5, 2012, at 3:57 PM, Bill Walton wrote: On Thu, Jan 5, 2012 at 4:44 PM, Craig White craig.wh...@ttiltd.com wrote: On Jan 5, 2012, at 3:37 PM, Bill Walton wrote: Hi Craig, On Thu, Jan 5, 2012 at 4:18 PM, Craig White craig.wh...@ttiltd.com wrote: pMissing template ...

Re: [Rails] assest pipeline how to exclude some css files?

2012-01-05 Thread Mauro
On 5 January 2012 18:24, Ralph Shnelvar ral...@dos32.com wrote: Thursday, January 5, 2012, 9:25:03 AM, you wrote: M In my assets I have M intranet M   |_1.css.scss M   |_2.css.scss M internet M   |_1.css.csss M application.css M application_internet.css M application_intranet.css M

Re: [Rails] js update partial missing template

2012-01-05 Thread Javier Quarite
On Thu, Jan 5, 2012 at 5:18 PM, Craig White craig.wh...@ttiltd.com wrote: app/views/permissions/add_member.js.erb $('#privileges').replaceWith(%= escape_javascript(render(@permissions)) %); Sorry if my question is not about the main problem but, could you explain why are you using

Re: [Rails] js update partial missing template

2012-01-05 Thread Craig White
On Jan 5, 2012, at 4:41 PM, Javier Quarite wrote: On Thu, Jan 5, 2012 at 5:18 PM, Craig White craig.wh...@ttiltd.com wrote: app/views/permissions/add_member.js.erb $('#privileges').replaceWith(%= escape_javascript(render(@permissions)) %); Sorry if my question is not about the

[Rails] Re: help with some ugly code: refactoring

2012-01-05 Thread Max
thanks guys, between the two of you I got it nailed! Max On Jan 5, 11:19 am, M Daubs mdaub...@gmail.com wrote: Here is my suggestion. Have your User model ignore attempts to set a blank password: def password=(value)   super(value) unless value.empty? end And then change your controller

[Rails] Re: How to Send ESC commands to a DOT MATRIX printer in Ruby on Rails?

2012-01-05 Thread sly verano
Hi Michael, We will use a client workstation. Thanks for the response. On Jan 5, 4:33 pm, Michael Pavling pavl...@gmail.com wrote: On 5 January 2012 03:04, sly verano slyver...@gmail.com wrote: Guys I need your help. I need to print RAW data to format the settings of the printer. You

Re: [Rails] js update partial missing template

2012-01-05 Thread Bill Walton
On Thu, Jan 5, 2012 at 5:26 PM, Craig White craig.wh...@ttiltd.com wrote: On Jan 5, 2012, at 3:57 PM, Bill Walton wrote: Then my best advice would be to double check the accepts header using Live Http Headers.  You may need to do some explicit setup prior to the post. wish I

[Rails] Re: composite keys and association

2012-01-05 Thread Daisy Di
Colin Law wrote in post #1039519: On 5 January 2012 02:53, Daisy Di li...@ruby-forum.com wrote: dont have this column,and i cant change any thing in the database,how to resolve this problem?Thanks . A way to resolve the problem is to stick to the rails conventions for id columns and so on.

[Rails] Complex query with multiple joins

2012-01-05 Thread Linus Pettersson
Hi! I have an app that manages products. I import the products from several resellers and they all name their categories different. Because of this I have resellercategories that are mapped to my own subcategories. Categories - Subcategories (belongs_to Category) Resellercategories

[Rails] Re: lock the sign in account when login failed more than 5 times

2012-01-05 Thread Daisy Di
Colin Law wrote in post #1039527: On 5 January 2012 09:47, Daisy Di li...@ruby-forum.com wrote: Hi all i have two table,member and failed_times,the member table is designed by customer which i cant modify anything, but the failed_times is created by myself.the columns in the failed_times are

[Rails] link_to parameter used in controller

2012-01-05 Thread miek test
okay, so ive got a view page of 'columns', each comprised of a name and code. ive got a button to 'add columns' and i want it to pass it an integer parameter so i can set up the default number of boxes for adding so in my view ive got = link_to Add columns, new_column_path, :number = 5 and in

[Rails] Re: Rails on iPad

2012-01-05 Thread Kit H.
I'm very interested in learning Rails. I've only done a little HTML, CSS, and PHP in the past. The catch is, I only use an iPad. So is this even possible to do if someone setup the server for me first? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are

[Rails] location of Devise::SessionsController

2012-01-05 Thread Amit C.
Hi I am working on login-logout functionality in my project. When I provide the login details and click on login button, it goes to some create method in Devise::SessionsController and when I click on logout button, it goes to some destroy method in Devise::SessionsController and I am not able to

Re: [Rails] location of Devise::SessionsController

2012-01-05 Thread Sanjiv Jha
Hi Amit, Looking at controller name Devise::session controller name its clear you are using devise, if you have not override devise , them it will go to gem devise method , take a look at them , you will understand that. Regards, Sanjiv Kumar Jha Josh Software Private Limited

SV: [Rails] Duplicate forms after click

2012-01-05 Thread Brynjolfur Thorvardsson
Hi, this sounds like a javascript problem. Javascript is executed asynchroniously on your browser so clicking fast means that you are sending more than one submit from the same form, causing Rails to return more than once from the controller. There are probably many ways to avoid this but one

SV: [Rails] assest pipeline how to exclude some css files?

2012-01-05 Thread Brynjolfur Thorvardsson
Well, the easiest way would be to simply remove the files you don't want to use? You might also try using a dynamic css, if you rename your application.css to application.css.erb it will still work as before but now you can embed ruby code. If your other css files have a different ending (e.g.