Ruby on Rails Tuesday, May 31, 2011

On Jun 1, 1:58 am, Herman <herman...@gmail.com> wrote:
> Hi all,
>
> In one of my create action in the controller, I am catching a error
> and trying to show errors on the same page.  It was all good when I
> called render action => 'new'.  However, I also wanted to append a
> query string for consistence purposes.  How do I do that with render?
> For now, I can only call redirect_to and put the error in the flash
> variable which doesn't seems to be as clean of a solution.
>
render just renders a template - you can't change the query string
(without redirecting) because the browser shows the url it accessed.
You could change your form to a get form if you wanted to (although
that would put all the form parameters in the url)

Fred
> Thanks in advance.

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

On May 31, 8:48 pm, daze <dmonopol...@gmail.com> wrote:
> On May 31, 9:41 am, Frederick Cheung <frederick.che...@gmail.com>
> wrote:
>
> > > Is it a problem if some articles were already cleaned by doing a
> > > search and replace, e.g. swapping all ’ for its corresponding proper
> > > symbol?
>
> > Depends. if you have replaced with pure ascii then it's not a problem.
> > if not (ie for a given column and table you have a mix of encodings)
> > then you will have made things worse.
>
> Oh... thank you for answering me!  Basically, some people ran search-
> and-replaces for these:
>
> "| replaced with :
> â€" replaced with -
> ’ replaced with  '
> “ replaced with "
> †replaced with "
>
> I apologize for my lack of expertise, but have things been replaced
> "with pure ascii"?  (What exactly is that...?)

Those are pure ascii characters (ie can be represented by a 7 bit
integer. Latin1, UTF8, etc. all represent these characters in the same
way so you shouldn't get a problem
>
> One other thing:
> Does the encoding or interpretation of encoding vary from browser to
> browser?  See, I went to school and checked out the site - only to
> find this odd symbol located after double-quotes... it looked like two
> squares on top of each other...
> Yet, at home, or outside of school, I do not see this symbol anywhere.
> Why might this be?
>
as walter says, that sounds the missing glyph character, ie "you've
asked me to display a character that I can't display"

Fred
> (Thank you again!)

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

This works find on 2.3.5. I have a form with a select list. Selecting
a value (it's a search type), typing in a text value into a text
field, then submitting the form (which causes a an SQL search and a
redispay of the initial page with the selected records.

2.3.5 preserved the values of the select list across invocations.
3.0.7 resets the selected value of the list to #0.

??

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Hi all,

In one of my create action in the controller, I am catching a error
and trying to show errors on the same page. It was all good when I
called render action => 'new'. However, I also wanted to append a
query string for consistence purposes. How do I do that with render?
For now, I can only call redirect_to and put the error in the flash
variable which doesn't seems to be as clean of a solution.

Thanks in advance.

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

On Tue, May 31, 2011 at 6:25 PM, Jedrin <jrubiando@gmail.com> wrote:
>
> I tried this and I seem to still have the same exact problem:

Another resource that's incredibly helpful, in case you don't already
subscribe, is the css-discuss list. It's run by Eric Meyer and is a
how-do-i-do-or-fix-this-thing list. The name is a little misleading.
There's no opining. Post your objective, your code or a link to a
page with the problem, and you will get very specific instruction on
how to achieve your goal.

Best regards,
Bill

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

On Tue, May 31, 2011 at 5:48 PM, Walter Davis <waltd@wdstudio.com> wrote:
>
> On May 31, 2011, at 6:32 PM, Bill Walton wrote:
>
>>  I believe most current browsers
>> will give precedence to the stylesheet over inline styling.
>
> Sorry, I disagree with this. The stylesheet is given the same priority as
> ever, in keeping with the idea of "weight" inherent to the cascade. The
> closer a declaration is to the thing that it governs, the more authoritative
> it is taken to be.


I stand corrected. Thanks.

Best regards,
Bill

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

You can simply view source in a browser. Furthermore, Safari or
Firefox (with Firebug) can show you endless detail about the script on
your page. The shortcut is the same: Control (or right) click on the
element, and "Inspect Element". That will show you the actual rendered
properties, not what's hard-coded in the generated HTML.

Walter

On May 31, 2011, at 7:25 PM, Jedrin wrote:

> I wonder if something has changed with prototype ? I'm not sure how I
> can view the generated javascript for this ?

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

I tried this and I seem to still have the same exact problem:
page[k].set_style({:position => 'absolute', :left => (pidx * 300),
:top => (1 * (topidx * 200) + 80),
:'z-index' => 10})

A side note, is that if I do the following without the parens, I get a
syntax error of some sort.
I was never really sure why that happens:

page[k].set_style {:position => 'absolute', :left => (pidx * 300),
:top => (1 * (topidx * 200) + 80),
:'z-index' => 10}


I wonder if something has changed with prototype ? I'm not sure how I
can view the generated javascript for this ?

thanks

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

On May 31, 2011, at 6:58 PM, Jedrin wrote:

> I tried this which doesn't seem to do anything either:
> page[k].set_style :z_index => 20
>
>
> I believe that the following syntax is valid:
> page[k].set_style :'z-index' => 20
>
> I tried this:
>
> C:\Users\Laurence>irb
> irb(main):001:0>
> irb(main):002:0*
> irb(main):003:0* x = :'z-index'
> => :"z-index"
> irb(main):004:0> x.class
> => Symbol
> irb(main):005:0>
> irb(main):009:0> x
> => :"z-index"
> irb(main):010:0>
>
>

I agree, that does seem to work as expected. I'm not an expert on the
RJS side of things, but I have used Prototype for many years, and $
('foo').setStyle('z-index: 20') certainly works there. Maybe there's
an alternative syntax you could use, where instead of pecking away
with multiple calls to set_style, you could concatenate a hash and
send the whole thing at once, maybe something like foo.set_style {:'z-
index' => 20, :font_size => font_sz, ... }

Walter

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

I tried this which doesn't seem to do anything either:
page[k].set_style :z_index => 20


I believe that the following syntax is valid:
page[k].set_style :'z-index' => 20

I tried this:

C:\Users\Laurence>irb
irb(main):001:0>
irb(main):002:0*
irb(main):003:0* x = :'z-index'
=> :"z-index"
irb(main):004:0> x.class
=> Symbol
irb(main):005:0>
irb(main):009:0> x
=> :"z-index"
irb(main):010:0>


--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

On May 31, 2011, at 6:32 PM, Bill Walton wrote:

> I believe most current browsers
> will give precedence to the stylesheet over inline styling.

Sorry, I disagree with this. The stylesheet is given the same priority
as ever, in keeping with the idea of "weight" inherent to the cascade.
The closer a declaration is to the thing that it governs, the more
authoritative it is taken to be.

You can see this very easily in Safari's Web Inspector by using
(Contextual Menu: Inspect Element) and look at the attributes declared
on the local object versus those in the style sheet(s). The list in
the sidebar will show various attributes grayed back and crossed out
as those higher in the list contradict them. At the very top of the
list is the Computed Style section (closed by default) which will show
the result of all this cascading jujutsu.

If you make a little sample document, you can see this for yourself.
Local (inline) attributes still trump all.

The only exception to this would be if you add the !important flag to
the end of a rule. That will override even a locally-declared
attribute, and didn't use to, and this may be the part you're
remembering.

Walter

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Hi Jedrin,

On Tue, May 31, 2011 at 5:11 PM, Jedrin <jrubiando@gmail.com> wrote:
>
>  When doing RJS stuff of the form below, I seem to recall unexpected
> behavoir where if I had many method calls within that block things
> didn't work as expected and variables would not have values I
> expected. I know I am not being very specific and I don't have an
> example. I am trying to refactor some code where I have alot of code
> inside the block and I am affraid I am going to have the same sort of
> problem I used to have previously when I had written alot of RJS stuff
> previously.
>
>  render :update do |page|
>     ...
>  end

I tend to use render :update from within the controller in cases where
there are a small number (like 4 max) of method calls. Beyond that, I
think it improves readability and testability to move the method calls
to an rjs template.

Best regards,
Bill

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

The missing glyph character is a feature of many different fonts -- it
means literally, "I don't have any glyph by that name in my table".
The way you "get rid of it" is by providing an encoding and
substitution escapes that convert the wide, wild world of Unicode
typography into something that the more limited browser/OS
combinations can handle.

There are fonts that specialize in having suitably large collections
of characters to print nearly anything besides Klingon. These will
often have the word Unicode in their name. Many, if not most, core Mac
fonts are Unicode-aware, and if you are writing out a CSS font-family
that you mean to cover the most possible characters, you will add the
Microsoft variants of those to your list:

font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans",
Lucida, Geneva, Verdana, sans-serif;

In order for even this font family to work, the user will have to
install a modern version of their operating system, and maybe a modern
browser, and you can't know or control that at all. But you can and
should declare a character encoding through your DOCTYPE and meta
tags, and your server should send a content-type header that includes
a charset attribute. All of these should match the encoding within
your database, and within the other content served by your Web server.
One charset to rule them all!

If your data is stuck in a particular charset, and you can't figure
out how to convert it into UTF-8, then you need to modify everything
-- starting with Rails -- to recognize that the content is in that
encoding, and to treat it as such. Then you also need to specify the
encoding in the generated HTML, so your /layouts/application.html.erb
or local equivalent should have this line in it somewhere:

<meta http-equiv="Content-type" content="text/html;
charset=YourEncodingHere" />

Walter

On May 31, 2011, at 6:25 PM, daze wrote:

> On May 31, 4:02 pm, Walter Davis <wa...@wdstudio.com> wrote:
>> If the browser is using a typeface (font) that doesn't include the
>> precise character that your page encoding and HTML require, then you
>> won't see that character. The glyph you describe sounds like the
>> "missing glyph" character, and that's why I'm guessing you're
>> seeing it.
>
> But the missing glyph character should be replaced with nothing. In
> fact, if I could do so easily, I would just delete all these "missing
> glyph" characters...
> Is there anything you recommend I do about the missing glyph? I mean
> I don't even see it on my home computer... only on the computers at
> school.
>
> --
> 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 email to rubyonrails-talk+unsubscribe@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
> .
>

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Hi Jedrin,

On Tue, May 31, 2011 at 5:22 PM, Jedrin <jrubiando@gmail.com> wrote:
>  I have a section of controller code that tries to style a page with
> moving text and images.
> This used to work a few years ago, but I have not had the site working
> for awhile and I am trying to resurrect it.
> Below is some of the RJS code. The z-index and font-size does not seem
> to work as far as I can tell, though I am especially focused on z-
> index not working. My moving text is supposed to be in front of the
> images, but it is not.
> If I do view generated source from web developer plugin, one of the
> elements generated is shown below. I am not sure if my problem may be
> something different in RJS or CSS is needed or what else I can try to
> troubleshoot the problem ? I am using rails 3.0.5 at the moment ..
> thanks

Another possibility, if Walter's suggestion doesn't lead to a
solution, is that the different behavior you're seeing now vs. then
has to do with browser 'maturation.' I believe most current browsers
will give precedence to the stylesheet over inline styling.

HTH,
Bill

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

On May 31, 2011, at 6:22 PM, Jedrin wrote:

> I have a section of controller code that tries to style a page with
> moving text and images.
> This used to work a few years ago, but I have not had the site working
> for awhile and I am trying to resurrect it.
> Below is some of the RJS code. The z-index and font-size does not seem
> to work as far as I can tell, though I am especially focused on z-
> index not working. My moving text is supposed to be in front of the
> images, but it is not.
> If I do view generated source from web developer plugin, one of the
> elements generated is shown below. I am not sure if my problem may be
> something different in RJS or CSS is needed or what else I can try to
> troubleshoot the problem ? I am using rails 3.0.5 at the moment ..
> thanks
>
>
> page[k].set_style :'font-size' => font_sz
> page[k].set_style :color => col
> page[k].set_style :position => 'absolute'
> page[k].set_style :left => 40 + (horz)
> horz = horz + spacing + (w.length * mult)
> page[k].set_style :top => (tidx * 100) + 70
> page[k].set_style :'z-index' => 20
> page[k].visual_effect effect, {:queue=> {:position =>
> 'end', :scope => scope}, :duration => 1}
>
> some of the dynamic css generated:
>
> <span id="sp0_0" style="color: purple; position: absolute; left: 40px;
> top: 70px; overflow: visible;">Free</span>

Which suggests that :'z-index' is being ignored. Are you sure that's
the way to set this property (quoted symbol name)? Have you
tried :z_index instead? (I have no idea, that's just a guess.) In
vanilla JavaScript, any of the attributes that have dashes in their
name get interCapped, but that doesn't seem like it would work on the
Ruby side of things.

Walter

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

On May 31, 4:02 pm, Walter Davis <wa...@wdstudio.com> wrote:
> If the browser is using a typeface (font) that doesn't include the  
> precise character that your page encoding and HTML require, then you  
> won't see that character. The glyph you describe sounds like the  
> "missing glyph" character, and that's why I'm guessing you're seeing it.

But the missing glyph character should be replaced with nothing. In
fact, if I could do so easily, I would just delete all these "missing
glyph" characters...
Is there anything you recommend I do about the missing glyph? I mean
I don't even see it on my home computer... only on the computers at
school.

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

I have a section of controller code that tries to style a page with
moving text and images.
This used to work a few years ago, but I have not had the site working
for awhile and I am trying to resurrect it.
Below is some of the RJS code. The z-index and font-size does not seem
to work as far as I can tell, though I am especially focused on z-
index not working. My moving text is supposed to be in front of the
images, but it is not.
If I do view generated source from web developer plugin, one of the
elements generated is shown below. I am not sure if my problem may be
something different in RJS or CSS is needed or what else I can try to
troubleshoot the problem ? I am using rails 3.0.5 at the moment ..
thanks


page[k].set_style :'font-size' => font_sz
page[k].set_style :color => col
page[k].set_style :position => 'absolute'
page[k].set_style :left => 40 + (horz)
horz = horz + spacing + (w.length * mult)
page[k].set_style :top => (tidx * 100) + 70
page[k].set_style :'z-index' => 20
page[k].visual_effect effect, {:queue=> {:position =>
'end', :scope => scope}, :duration => 1}

some of the dynamic css generated:

<span id="sp0_0" style="color: purple; position: absolute; left: 40px;
top: 70px; overflow: visible;">Free</span>

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

When doing RJS stuff of the form below, I seem to recall unexpected
behavoir where if I had many method calls within that block things
didn't work as expected and variables would not have values I
expected. I know I am not being very specific and I don't have an
example. I am trying to refactor some code where I have alot of code
inside the block and I am affraid I am going to have the same sort of
problem I used to have previously when I had written alot of RJS stuff
previously.

render :update do |page|
...
end

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Hi i am a ruby on rails programmer with almost a year experience i am
having problems using the asset tag helper in rails 3.1. if i do
something like
<% image_tag('rails.png') %> the image does not get displayed. if i
check my server log, i realized that it cannot find the image. That is
for images. As for SCSS style sheet it works but whenever i refresh my
browser i get a default template. then my server log says undefined
method >= for nil:NillClass. i dont no what to do at this moment. if i
switch to rails 3.0.7 it all works fine but SCSS does not work at all.
I'm using railsinstaller 1.1.1 with ruby 1.8.7.

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

If the browser is using a typeface (font) that doesn't include the
precise character that your page encoding and HTML require, then you
won't see that character. The glyph you describe sounds like the
"missing glyph" character, and that's why I'm guessing you're seeing it.

Another layer to this cake.

Walter

On May 31, 2011, at 3:48 PM, daze wrote:

> See, I went to school and checked out the site - only to
> find this odd symbol located after double-quotes... it looked like two
> squares on top of each other...

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

On May 31, 9:41 am, Frederick Cheung <frederick.che...@gmail.com>
wrote:
> > Is it a problem if some articles were already cleaned by doing a
> > search and replace, e.g. swapping all ’ for its corresponding proper
> > symbol?
>
> Depends. if you have replaced with pure ascii then it's not a problem.
> if not (ie for a given column and table you have a mix of encodings)
> then you will have made things worse.

Oh... thank you for answering me! Basically, some people ran search-
and-replaces for these:

"| replaced with :
â€" replaced with -
’ replaced with '
“ replaced with "
†replaced with "

I apologize for my lack of expertise, but have things been replaced
"with pure ascii"? (What exactly is that...?)

One other thing:
Does the encoding or interpretation of encoding vary from browser to
browser? See, I went to school and checked out the site - only to
find this odd symbol located after double-quotes... it looked like two
squares on top of each other...
Yet, at home, or outside of school, I do not see this symbol anywhere.
Why might this be?

(Thank you again!)

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

EDIT: this code in order to have a successful update:

                         <%= check_box_tag "foo[foo_ids][]", bar.id, @foo.bars.include?(bar), :id => bar.id %>
                        <label for="<%= bar.id %>"><%= bar.Name %></label>

On Tue, May 31, 2011 at 8:36 PM, Federico Rota <federico.rota01@gmail.com> wrote:
Well, I'm a newbie in rails and habtm worked just fine for my simple application.
Jason you pointed me in the right direction and after a quick search I did it.
My working code is the following (in case somebody needs it):

                         <%= check_box_tag "foo[bar_ids][][#{bar.id}]", tag.id, @foo.bars.include?(bar) %>
                        <label for="foo_bar_ids__<%= bar.id %>"><%= bar.Name %></label>
David, thank you for your answer too.


On Tue, May 31, 2011 at 1:29 AM, David Kahn <dk@structuralartistry.com> wrote:


On Mon, May 30, 2011 at 6:27 PM, Jason Fleetwood-Boldt <tech@datatravels.com> wrote:

On May 30, 2011, at 6:27 PM, David Kahn wrote:

<div class="ui-field-contain ui-body ui-br" data-role="fieldcontain">
<fieldset class="ui-corner-all ui-controlgroup ui-controlgroup-vertical" data-role="controlgroup">
<div class="ui-checkbox">
    <input id="foo_bar_ids_" type="checkbox" value="19" name="link[bar_ids][]" checked="checked">
</div>
     <label for="19">Jquery</label>
<div class="ui-checkbox">
   <input id="foo_bar_ids_" type="checkbox" value="25" name="foo[bar_ids][]" checked="checked">
</div>
    <label for="25">Web</label>
</fieldset>
</div>


David,

I think I see your problem. The for attribute of the label tag has to match the id attribute of the input checkbox. You have two input checkboxes with ids of "foo_bar_ids_" -- that's not really allowed by HTML, you should make that be "foo_bar_ids_19" and "foo_bar_ids_25"

The for of the label tag should match the id of the input tag -- this is actually how HTML works and has nothing to do with rails (see http://www.w3schools.com/tags/tag_label.asp). I always thought that was counter intuitive myself but that's how it works. 

To do that, you specify :id => in the check_box_tag and also :for => label_tag (you happen to not be using label_tag, but if you were you could specify :id => )

Personally I never use HABTM, because I always find I'm going to eventually want to add a field to the join table which you can't do with HABTM. Use has_many :through => instead of HABTM. (but that is actually irrelevant to the problme you have)

Thats a good point... I just got killed by using HABTM and ended up creating a join model. Especially if you are dealing with nested forms and want to create the join record specifically based on data in the form.
 

-Jason

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.


--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

On May 31, 11:21 am, Jedrin <jrubia...@gmail.com> wrote:
>  I am in the USA. I tend to target mostly Rails work.
>
>   Robert Half had called me and said that they had been getting in
> Rails contracts and wanted to talk to me. Often times they do not get
> so much rails work. I took it as a possible sign of a pickup in rails.
> I went to their office and met with them and they had given me this
> contract to sign.
>
>  My impression had been that their rates may seemed to be low and I
> had flat out told them that in the past. This in particular when they
> told me $40 an hour for PHP work (or even less). I am less interested
> in PHP, but I don't want to rule it out altogether.  Thus far I have
> not told people who want to talk to me that I am not interested. I had
> not signed their contract and felt I should email the friendly fellow
> at Robert Half back and tell him something as to my impression of this
> contract as to why I don't want to sign it or maybe other people can
> tell me it doesn't matter really if I sign it or not, but my default
> position is I am not going to sign it ..

If you don't understand the contract, then just don't sign it.

You can always get a lawyer to look this thing over for you too, if
you want to invest in it.

Odds are, if the contract doesn't make sense, or is obscure, there's a
good reason - it benefits them and it hoses you. Just my experience -
take it for what it's worth.

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Well, I'm a newbie in rails and habtm worked just fine for my simple application.
Jason you pointed me in the right direction and after a quick search I did it.
My working code is the following (in case somebody needs it):

                         <%= check_box_tag "foo[bar_ids][][#{bar.id}]", tag.id, @foo.bars.include?(bar) %>
                        <label for="foo_bar_ids__<%= bar.id %>"><%= bar.Name %></label>
David, thank you for your answer too.

On Tue, May 31, 2011 at 1:29 AM, David Kahn <dk@structuralartistry.com> wrote:



On Mon, May 30, 2011 at 6:27 PM, Jason Fleetwood-Boldt <tech@datatravels.com> wrote:

On May 30, 2011, at 6:27 PM, David Kahn wrote:

<div class="ui-field-contain ui-body ui-br" data-role="fieldcontain">
<fieldset class="ui-corner-all ui-controlgroup ui-controlgroup-vertical" data-role="controlgroup">
<div class="ui-checkbox">
    <input id="foo_bar_ids_" type="checkbox" value="19" name="link[bar_ids][]" checked="checked">
</div>
     <label for="19">Jquery</label>
<div class="ui-checkbox">
   <input id="foo_bar_ids_" type="checkbox" value="25" name="foo[bar_ids][]" checked="checked">
</div>
    <label for="25">Web</label>
</fieldset>
</div>


David,

I think I see your problem. The for attribute of the label tag has to match the id attribute of the input checkbox. You have two input checkboxes with ids of "foo_bar_ids_" -- that's not really allowed by HTML, you should make that be "foo_bar_ids_19" and "foo_bar_ids_25"

The for of the label tag should match the id of the input tag -- this is actually how HTML works and has nothing to do with rails (see http://www.w3schools.com/tags/tag_label.asp). I always thought that was counter intuitive myself but that's how it works. 

To do that, you specify :id => in the check_box_tag and also :for => label_tag (you happen to not be using label_tag, but if you were you could specify :id => )

Personally I never use HABTM, because I always find I'm going to eventually want to add a field to the join table which you can't do with HABTM. Use has_many :through => instead of HABTM. (but that is actually irrelevant to the problme you have)

Thats a good point... I just got killed by using HABTM and ended up creating a join model. Especially if you are dealing with nested forms and want to create the join record specifically based on data in the form.
 

-Jason

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

I have a module that extends ActiveSupport::Concern. Here is the
`included` block:

included do
after_save :save_tags

has_many :taggings, :as => :taggable
has_many :tags, :through => :taggings
end

How can I stub out these calls? I have tried a few ways, but Ruby
complains that these methods don't exist when I try and test the
module in isolation.

Thanks!

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

On Tue, May 31, 2011 at 8:05 AM, Peter Bell <peter@pbell.com> wrote:

Just in case anyone runs into the same issue, it's documented here:

For me, removing postgres solved the problem. Had planned on moving to MongoDB anyway . . .

Best Wishes,
Peter

Peter, I have the following questions:

a)  Can you post actual error report(s) that you received because many others with similar configurations may not
     so easily switch to another DB engine?

b)  Are the gems that you're using compatible to Ruby 1.9.2 ?  For example, did you run the unit tests for Postgres
     and other gems that may be causing you issues?

c)  Does this happen with the latest patch version of Ruby 1.9.2 ?  At this time, the latest patch for Ruby 1.9.2 is
     271.

-Conrad


Begin forwarded message:

From: Peter Bell <peter@pbell.com>
Date: May 31, 2011 9:47:58 AM EDT
Subject: Seg fault with Ruby 1.9.2 p180 and Rails 3.1 rc1

Hi All,

I've got a very simple OmniAuth install. I've registered the app with
facebook and the login works fine. When Facebook runs it's callback
and tries to pull up localhost:3000/auth/facebook/callback, I get a
"page can't be displayed" in my browser and in the terminal window
where I'm running "rails server" it crashes with a Ruby SegFault.

Here's the gist: https://gist.github.com/1000515

Bottom line:
Started GET "/auth/facebook" for 127.0.0.1 at 2011-05-31 09:32:48
-0400
/Users/peterbell/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/
http.rb:678: [BUG] Segmentation fault
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0]

Anyone seen anything like this before at all? I'm running 1.9.2 p180,
Rails 3.1 rc1 and the default version of OmniAuth (0.2.6)

Any suggestions for possible work arounds? I need to knock this app
out pretty quickly, and I love OmniAuth, but this is a bit of a
surprise.

Can't drop down to Ruby 1.8.7 or Rails 3.0.7/8. Open to trying
OmniAuth 1.0-beta if you think it'd help.

Anyone seen anything like this before? Any input appreciated.

Thanks,
Peter

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

On May 31, 2011, at 12:21 PM, Jedrin wrote:

> If I sign the contract and send it in to them, they may obviously
> call me with job opportunities. If I don't send the contract in, I may
> neve hear from them again or I would have to deal with the contract
> issue the next time they try to call me.


If you want to work with them, you'll have to sign the contract. That sounds normal. If you have problem with provisions in the contract, identify those specific provisions and tell them your concerns and see if they will modify the agreement to address your concerns.

That's life. We can't make this decision for you, you're gonna have to make it on your own. If you have any other questions for me, you are welcome to email me off-list as I'm sure the rest of the list is getting tired of this off-topic post.

-Jason

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

>
> Your best best is probably going out and interviewing without a recruiter, but that's harder and takes more time.
>

I have tried to apply to jobs that are advertised directly by
companies. Sometimes if a job sounds good and it's advertised by an
agency, I will still apply.

Once an agency has my resume from somewhere, they may call me. If
they call me I usually reply to them which is how I got hooked in with
Robert Half. Once I put my resume on Dice and I got so many calls in
one day that I had to take it off.

If I sign the contract and send it in to them, they may obviously
call me with job opportunities. If I don't send the contract in, I may
neve hear from them again or I would have to deal with the contract
issue the next time they try to call me.

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Hi geeks,

  I wrote a ruby script , By using this, we can see fossjobs from terminal that was posted in fossjobs.in 

Link of that script was below. Please see that and give your suggestion

http://sathia27.wordpress.com/2011/05/30/update-foss-job-script/

Using this we can,
  1. we can search for job by date
  2. by range of date
  3. and by keywords (i.e) ROR, PHPMYSQL etc.
  4. We can also see description of job,  if we needed.
                                                        Thank you          
   

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

I was just saying I had good experiences with them and found them more reputable than the rest, I do not have any affiliation with them at all. (In fact I left that job about a year later).

Your best best is probably going out and interviewing without a recruiter, but that's harder and takes more time.


On May 31, 2011, at 12:04 PM, Jedrin wrote:

> I am not sure I have time for a job counselor or a lawyer on this.
> It's just that it's this 4 page contract type thing that I am not used
> to signing. I had the impression that perhaps it wasn't a big deal,
> but if I can't be sure of that I wasn't going to sign it. It's not
> like there aren't other agencies or jobs out there, but on the other
> hand you seem to give a plug for Robert Half, so maybe I should
> consider signing it. I guess I will have to think about it some
> more ..

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Jason,

Sorry if this is an off topic post. I don't frequent alot of IT
related groups and feel somewhat comfortable what people from the
Rails group might have to say as I have posted on this group a number
of times etc ..

I am not sure I have time for a job counselor or a lawyer on this.
It's just that it's this 4 page contract type thing that I am not used
to signing. I had the impression that perhaps it wasn't a big deal,
but if I can't be sure of that I wasn't going to sign it. It's not
like there aren't other agencies or jobs out there, but on the other
hand you seem to give a plug for Robert Half, so maybe I should
consider signing it. I guess I will have to think about it some
more ..


--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Jedrin,

Your topic is totally off-post, but I will give you my 2¢ anyway.

I was placed at a company 3 years ago by Robert Half. I found them to be the most reputable agency out there, and I had very good experiences with them. (They placed me for a PHP job.) Almost all recruiters I've met are scum (really, scum of the earth), but the people at Robert Half that I worked with were respectable and professional. Pushy, at times, but professional. 

It sounds like the contract they want you to sign is a non-compete contract, meaning that if they introduce you to a client who then hires you they get to collect a recruiter's fee (typically 20-33% of your annual salary). You don't pay this, the employer does. This is actually standard in the industry (for recruiters), although it is kind of appalling. 

The contact they want you to sign is basically saying that if they introduce you to one of their clients, you can't go work for that client directly without A) working through them or B) them getting their placement fee from the employer. That's all they want -- money. It is in everyone's interest for you to get a good job. 

This is what you wrote is in the contract:

Consultant agrees to provide, on an
as needed basis, such IT services required by Robert Half from time to
time .. work provided hereunder shall be under direction of Robert
Half or client(s) of Robert Half


Based on the provision you posted in contact, I don't actually know what your concern is. You are right to read contracts before signing them and to seek as much information as possible, of course, but it is unclear to me what your actual concern is. Maybe you concerned that this contract is obligating you to do work for them -- it isn't. Indentured servitude has been illegal for a long time and almost all states are "At-will" states, meaning you work "at will" and they can fire you "at will." All this part of the contract says is that IF you do work for one of their clients (that they introduce you to), it has to be through them. 

Do keep in mind that any contact that has a provision that is not in accordance with the law is not an enforceable contact -- no matter what anyone tells you, contracts can't circumvent "the people's will" (the law of the land). Non-compete agreements are extremely hard to enforce, and historically are meaningless. That doesn't mean you should try to get away with going behind their back to work for one of their clients, it just means that the scope of the agreement is typically narrow in the eyes of the law.

For example, let's say that you go out and make a contact with an employer they work with. But they didn't introduce you, you just happened to find that employer on your own. That would clearly not be covered under the non-compete agreement because they can't make a contract with you that limits your right to be a free agent and find work on your own. (That contract wouldn't be recognized by the law.) But if they do introduce you to the employer, they probably do have a legal case. Sometimes there is gray area, so see my suggestion #2 below. As I'm trying to explain, this stuff is complicated.

Basically if you go on an interview through Robert Half, they want to either subcontract you (make money off selling your hours), or they want a big fat placement fee (from the employer) that is about 25% of your annual salary (but that is negotiated between the employer & the recruiter, not you). If you play by those rules, you should be fine with Robert Half.  If you don't want that, I would suggest you not work with any recruiters at all. 

I would recommend you do two things:

1) See a job counselor who might help you (kind of like therapy but for your profession) figure out what it is that you need from your future employment. Boil it down to the things that matter to you (hours, location, salary, work environment, type of work, etc). Then figure out if what Robert Half is asking you to sign is at odds with any of those core things. If it is, bring it up to them as part of your core values you don't want to give up. I wouldn't recommend not signing the contract on principle -- everyone is going to have a contract, it is just a matter of what in the contract is at odds with what you need. 

2) If you are really concerned about the language within the contract, you should consult a lawyer. Only a lawyer can offer you legitimate legal advice based on the laws in your state. You can also get free advice from various labor boards and/or labor advocacy groups. If you do that, be sure to have a specific question that you want an answer for. 

Good luck!

-Jason


On May 31, 2011, at 11:21 AM, Jedrin wrote:



I am in the USA. I tend to target mostly Rails work.

 Robert Half had called me and said that they had been getting in
Rails contracts and wanted to talk to me. Often times they do not get
so much rails work. I took it as a possible sign of a pickup in rails.
I went to their office and met with them and they had given me this
contract to sign.

My impression had been that their rates may seemed to be low and I
had flat out told them that in the past. This in particular when they
told me $40 an hour for PHP work (or even less). I am less interested
in PHP, but I don't want to rule it out altogether.  Thus far I have
not told people who want to talk to me that I am not interested. I had
not signed their contract and felt I should email the friendly fellow
at Robert Half back and tell him something as to my impression of this
contract as to why I don't want to sign it or maybe other people can
tell me it doesn't matter really if I sign it or not, but my default
position is I am not going to sign it ..

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.



Ruby on Rails

Robert Half does have some IT postings for Ruby or related:

http://www.indeed.com/jobs?q=ruby&l=Boston,+MA&rbc=Robert+Half+Technology&jcid=8295f0911ec08bde

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

I am looking for a job and had talked to a company. The fellow there
encouraged me to make available some sort of code sample of my work. I
took some functionality out of a website I had worked on a few years
ago and created a rails plugin which is now on github here:

https://github.com/Larzo/buoy_report

Given that this code is part of my job search, I feel I should ask
any good ideas on how I can get some feedback ?

Also, I am interested on where I could find ideas to write some
simple plugins that might take a day or 2 to write or maybe even
people who are looking for someone to write a plugin, gem etc.


I used to have a text to speech ruby program that would read whatever
was in the paste buffer. I think I lost it when my old laptop crashed,
I could probably re write it, it wasn't that complex. I used to use it
to read text off of websites.

I am just looking for ideas to keep my skills going or improve them
one way or another. I hope to make it to the ruby meetup next month as
well.

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails



On Tue, May 31, 2011 at 12:18 AM, Piter Fcbk <piter.fcbk@gmail.com> wrote:
Hi all,
I'm currently in the need to implement a calendar in rails.
It should be able to present a year, month and day view.
The events in these 3 views should be able to be opened, on click, to view the information and/or edit it (according to restrictions).
The events will belong to users. One requirement is that users could filter which other users events they want to see (different colors for each user will be a nice to have).
After some reading, I finish up with these two options (open to more suggestions):
  - Using FullCalendar, something like this for example: https://github.com/vinsol/fullcalendar_rails

I will be very thankful if anyone could recommend a gem/way to go. Any opinion are welcome.

I was looking at this a year ago. I used full calendar and it is solid and easy to use, I have thought about creating a gem that would help by default to implement its features in a generalized way but no time yet to do. Also have considered working out an html based calendar... I may have an upcoming need, but it may very well reveal to be a huge project which full calendar has really already handled better. If you find anything that looks better than using full calendar definitely post back your finds here... but my vote would be full_calendar.
 

Thanks.

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

I am in the USA. I tend to target mostly Rails work.

Robert Half had called me and said that they had been getting in
Rails contracts and wanted to talk to me. Often times they do not get
so much rails work. I took it as a possible sign of a pickup in rails.
I went to their office and met with them and they had given me this
contract to sign.

My impression had been that their rates may seemed to be low and I
had flat out told them that in the past. This in particular when they
told me $40 an hour for PHP work (or even less). I am less interested
in PHP, but I don't want to rule it out altogether. Thus far I have
not told people who want to talk to me that I am not interested. I had
not signed their contract and felt I should email the friendly fellow
at Robert Half back and tell him something as to my impression of this
contract as to why I don't want to sign it or maybe other people can
tell me it doesn't matter really if I sign it or not, but my default
position is I am not going to sign it ..

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Just in case anyone runs into the same issue, it's documented here:


For me, removing postgres solved the problem. Had planned on moving to MongoDB anyway . . .

Best Wishes,
Peter

Begin forwarded message:

From: Peter Bell <peter@pbell.com>
Date: May 31, 2011 9:47:58 AM EDT
Subject: Seg fault with Ruby 1.9.2 p180 and Rails 3.1 rc1

Hi All,

I've got a very simple OmniAuth install. I've registered the app with
facebook and the login works fine. When Facebook runs it's callback
and tries to pull up localhost:3000/auth/facebook/callback, I get a
"page can't be displayed" in my browser and in the terminal window
where I'm running "rails server" it crashes with a Ruby SegFault.

Here's the gist: https://gist.github.com/1000515

Bottom line:
Started GET "/auth/facebook" for 127.0.0.1 at 2011-05-31 09:32:48
-0400
/Users/peterbell/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/
http.rb:678: [BUG] Segmentation fault
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0]

Anyone seen anything like this before at all? I'm running 1.9.2 p180,
Rails 3.1 rc1 and the default version of OmniAuth (0.2.6)

Any suggestions for possible work arounds? I need to knock this app
out pretty quickly, and I love OmniAuth, but this is a bit of a
surprise.

Can't drop down to Ruby 1.8.7 or Rails 3.0.7/8. Open to trying
OmniAuth 1.0-beta if you think it'd help.

Anyone seen anything like this before? Any input appreciated.

Thanks,
Peter

Ruby on Rails

Hi All,

I've got a very simple OmniAuth install. I've registered the app with
facebook and the login works fine. When Facebook runs it's callback
and tries to pull up localhost:3000/auth/facebook/callback, I get a
"page can't be displayed" in my browser and in the terminal window
where I'm running "rails server" it crashes with a Ruby SegFault.

Here's the gist: https://gist.github.com/1000515

Bottom line:
Started GET "/auth/facebook" for 127.0.0.1 at 2011-05-31 09:32:48
-0400
/Users/peterbell/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/
http.rb:678: [BUG] Segmentation fault
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0]

Anyone seen anything like this before at all? I'm running 1.9.2 p180,
Rails 3.1 rc1 and the default version of OmniAuth (0.2.6)

Any suggestions for possible work arounds? I need to knock this app
out pretty quickly, and I love OmniAuth, but this is a bit of a
surprise.

Can't drop down to Ruby 1.8.7 or Rails 3.0.7/8. Open to trying
OmniAuth 1.0-beta if you think it'd help.

Anyone seen anything like this before? Any input appreciated.

Thanks,
Peter

Ruby on Rails

On May 31, 1:01 pm, daze <dmonopol...@gmail.com> wrote:
> So... the old database used what type of encoding?  latin1?  And the
> new one uses utf8?
>

It's your database, you tell me!

> Is it a problem if some articles were already cleaned by doing a
> search and replace, e.g. swapping all ’ for its corresponding proper
> symbol?

Depends. if you have replaced with pure ascii then it's not a problem.
if not (ie for a given column and table you have a mix of encodings)
then you will have made things worse.

Fred
>
> Really appreciate the help!
>
> On May 29, 2:19 pm, Frederick Cheung <frederick.che...@gmail.com>
> wrote:
>
>
>
> > On May 29, 6:45 pm, daze <dmonopol...@gmail.com> wrote:> I'm wondering if anyone can give any insight into how I could resolve
> > > the problem on this website:
>
> > >http://jdrampage.com/
>
> > > basically, all the ' are supposed to be apostrophes ( ' ), and
> > > quotes are messed up too...
>
> > > Is it possible to run some command in the "rails console production"
> > > to fix this?
>
> > That does indeed look like an encoding issue. I assume that your '
> > were in fact curly quotes. This kind of thing can happen when there is
> > a mismatch between the encoding the database is using and what rails
> > is using.
>
> > For example if rails is using utf8, but the database connection is set
> > to CP1252 then in order to save the curly quote character, your ruby
> > script would send the bytes E3 80 99 which is the utf8 sequence for
> > the uncode right single quotation mark (U2019).
> > If your db connection is set to be latin1 (or any similar single byte
> > encoding) then it will happily store that byte sequence as it is.
>
> > If now your app were to start doing the right thing and ask the db for
> > utf8 then converts what it things is latin1 (but is actually already
> > utf8) into utf8 a second time and so you get garbage (in cp1252 E3 80
> > 99 is ’ which is what I see on your website). In order to fix this
> > you typically want to tell the database to reinterpret the contents of
> > text columns as utf8. How exactly depends on your database, but in
> > mysql something like
>
> > alter table foos MODIFY some_column BLOB;
> > alter table foos MODIFY some_column TEXT CHARACTER SET utf8;
>
> > will reinterpret whatever is in some_column as utf8. This might not be
> > exactly what you need - experiment with your data to see exactly what
> > what has happened - I once had a case where text was going through
> > this double encoding process twice so I had to repeat the above
> > commands twice to straighten out the data). Once you've sorted things
> > out, make sure you don't fall into this hole again by making sure that
> > all your databases and tables have their default encoding set to utf8
>
> > Fred
>
> > > Really appreciate any help!!

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

On 31 May 2011 14:22, Bryan Crossland <bacrossland@gmail.com> wrote:
> On May 31, 2011, at 3:49 AM, loganathan sellappa <loganathan.ms@gmail.com>
>> wrote:
>> sudo vi /etc/hosts
>> 127.0.0.1    m-lo-lo.com    p233
>
> That domain is not registered/does not exist. You would need to purchase the
> domain and point it at your server. If you are running this in dev on you
> local machine you can just edit the host file.

He did edit the host[s] file.

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Sent from my iPhone

On May 31, 2011, at 3:49 AM, loganathan sellappa <loganathan.ms@gmail.com> wrote:

Hi All,
 I want to run my application with domain name rather than local host ,so i followed the below steps,but i'm having unable to connect error ,can any one help me on this.
   gem install passenger
passenger-install-apache2-module


My rails app location:
/var/www/rails

cd /etc/apache2/sites-available
touch m-lo-lo.com(my virtualhost file)

<VirtualHost 127.0.0.1:8081>
  #ServerAdmin webmaster@myapp.com
  ServerName m-lo-lo.com
  DocumentRoot "/root/var/www/rails/public/"
   <Directory "/root/var/www/rails/public/">
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
  </Directory>
 RailsEnv production
PassengerMaxPoolSize 25
  LogLevel warn
  ErrorLog /var/log/apache2/rails/error.log
  CustomLog /var/log/apache2/rails/access.log combined
</VirtualHost>
 
To create symbolic link for virtual host file in "sites-enabled" directory 
  ln -s  /etc/apche2/sites-available/m-lo-lo.com /etc/apche2/sites-enabled/m-lo-lo.com
 
sudo vi /etc/hosts file
 
  #192.168.21.129    ubuntu    # Added by NetworkManager
#127.0.0.1    localhost.localdomain    localhost
127.0.0.1    m-lo-lo.com    p233
::1    ubuntu    localhost6.localdomain6    localhost6
127.0.1.1    ubuntu

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


vi port.conf
Listen 8081

<IfModule mod_ssl.c>
    # If you add NameVirtualHost *:443 here, you will also have to change
    # the VirtualHost statement in /etc/apache2/sites-available/default-ssl
    # to <VirtualHost *:443>
    # Server Name Indication for SSL named virtual hosts is currently not
    # supported by MSIE on Windows XP.
    Listen 443
</IfModule>

<IfModule mod_gnutls.c>
    Listen 443
</IfModule>


I created a file "passenger.load "in mod-available directory:

LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.7/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.7
PassengerRuby /usr/bin/ruby1.8

a2ensite m-lo-lo.com
Site m-lo-lo.com enabled

/etc/init.d/apache2 reload
/etc/init.d/apache2 restart

mkdir /var/log/apache2/rails/
touch access.log
touch error.log

cd /var/www/rails
touch tmp/restart.txt

hit my browser with
http://m-lo-lo.com
didnt have anything .





That domain is not registered/does not exist. You would need to purchase the domain and point it at your server. If you are running this in dev on you local machine you can just edit the host file.

B.


Regards,
Loganathan.s

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Sent from my iPhone

On May 31, 2011, at 5:33 AM, Chandu80 <chandu.shenoy@gmail.com> wrote:

> Hello All,
> I have a pop-up window with a close button and a minimize button,I
> want to know if there is a way of writing an action for minimizing the
> pop-up using Rails or does javascript need to be used here?
> On minimizing ,I want the pop-up to appear on the taskbar and on
> clicking the taskbar the popup should be restored.
>

That is not Rails. That is a JavaScript pop up followed by your standard browser behavior.

B.

>
> Thanks in advance.
>
>
> Regards
> Chandrika
>
> --
> 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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

On 31 May 2011 13:26, Jedrin <jrubiando@gmail.com> wrote:
> My mother's advice is if I am not
> sure, then don't sign it. I am curious what other developers might say
> or what their experience might have been with this agency ?

Does your mother give any advice about off-topic postings to mailing
lists? Really.... this has *nothing* to do with Rails. Do you have no
generic freelancers' forum to post to? (www.freelancers.net at
least... :-/


anyhoo...
You don't say what country you're in, and with something such as this,
local laws will be key.

Quickly Googling Robert Half, I assume you're in the UK... if so, does
the contract talk about "associated schedules of employment"?
If so, it's probably a fairly generic freelance employment contract,
but it is unusual to have to sign it *before* even going on an
interview. Typically, they should have a terms and conditions which
would cover fees due upon introduction of candidates, but they're
applicable to their clients, not the contractors they're providing
employment too (unless you're working directly for them...). Without
more information about the specifics of the role, I'm sitting here
shrugging due to the wide range of reasons they could be asking you to
sign for.

Given that Robert Half seem to specialise in accountancy candidates,
not computing, I'm confused why you're a Rails developer going through
them for work. Have they advertised a position, or have you contacted
them speculatively?

--
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 email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.