rubyonrailsin

A Ruby and Rails talk

Wednesday, March 17, 2010

Re: [spree-user] Re: User Personalisation of Products

by rubyonrailsin 0 comments
If the options are not the same for all variants of a product, then you need to tie the options to variants.

However: working at the product level will be much simpler. Can't you rephrase the variant customization as discrete options (and so use OptionValue etc?)

Paul


On Wed, Mar 17, 2010 at 7:59 PM, peachygifts <m.ward@leythers.com> wrote:
Can anyone tell me whether my personalisation_options should belong to
the product or the variant (or both)?

I'd imagine that I might want to specify different personalisation
options for each variant of a product, so it should belong to the
variant? Valid assumption?

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
Read More…

Re: [Rails] Re: updated rails now missing rails gem

by rubyonrailsin 0 comments
On Tue, Jan 26, 2010 at 12:26 AM, Morgan Morgan <lists@ruby-forum.com> wrote:
Morgan Morgan wrote:
> Morgan Morgan wrote:
>> So i updated rails and this is now what i'm getting.
>> i tried reinstalling rails and it didn't help.  it's installed.
>> this is driving me nuts.
>>
>> i'm at rails 2.3.5 and ruby 1.8.7
>>
>> Missing the Rails  gem. Please `gem install -v= rails`, update your
>> RAILS_GEM_VERSION setting in config/environment.rb for the Rails version
>> you do have installed, or comment out RAILS_GEM_VERSION to use the
>> latest version installed.
>
> ok. so mongrel can start a server with no problems but thin takes a
> dump.
> slowly making sense of this.

and figured it out.

thin can't cope with rack 1.1.0.  uninstalled the rack 1.1.0 gem and all
is well again.

Morgan, I just performed a quick test and I was able to get the following
working:

a)  Rails 2.3.5, Ruby 1.9.1/1.9.2, Rack 1.1.0, and Thin 1.2.7
b)  Rails 3.0 b, Ruby 1.9.1/1.9.2, Rack 1.1.0, and Thin 1.2.7

Thus, I'll be happy to send you my test Rails app for (a) above.

-Conrad

 
--
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-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.
Read More…

[spree-user] one page checkout

by rubyonrailsin 0 comments
Hi,

Is anyone intending to develop a one page checkout extension with the
new Spree release or upgrade an existing one page extension to work with
edge Spree? This has been brought up in the past, just wondering if it's
out there, anywhere.

Thanks,

Steph

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Read More…

Re: [Rails] Re: Problem with content-position and background-color in a sidebar

by rubyonrailsin 0 comments
On 17 March 2010 19:12, RichardOnRails
<RichardDummyMailbox58407@uscomputergurus.com> wrote:
>> I don't see where you are putting this in a div with id=sidebar.
>> Should you have
>>         <% content_for :sidebar do %>
>> <div id="sidebar">
>>           This is my sidebar stuff from:<br>
>>             new.html.erb<br>
>>             RTS\app\views\expenses
>> </div>
>>         <% end %>
>> or something similar?
>
> Here's what I've got:
>
> In app\views\expenses\new.html.erb (at the bottom) I have:
>        <% content_for :sidebar do %>
>          This is my sidebar stuff from:<br>
>            new.html.erb<br>
>            RTS\app\views\expenses
>        <% end %>
>
> Both divs are defined in app\views\layouts\standard.html.erb:
>    <body id="library">
>        <div id="container">
>            <div id="header">
>                <h1>Receipts Tracking System</h1>
>                <h3>Library powered by Ruby on Rails</h3>
>            </div>
>
>            <div id="content">
>                <%= yield -%>
>            </div>
>          <div id="sidebar">
>                <%= yield -%>
>            </div>
>        </div>
>    </body>
> </html>
>
> I just added that yield to div/sidebar based on no more than hot air.
> I availed me naught.

Forget about the ruby code for the moment, just check whether the html
is correct. If you just view the html in the browser (View, Page
Source) for the sidebar what do you see? Is the div id='sidebar'
there? Post that bit of html.

Colin

>
> On Mar 17, 1:18 pm, Colin Law <clan...@googlemail.com> wrote:
>> On 17 March 2010 16:52, RichardOnRails
>>
>>
>>
>> <RichardDummyMailbox58...@uscomputergurus.com> wrote:
>> >...
>> > app\views\layouts\expenses.html.erb:
>> > <body>
>> >    <p style="color: green"><%= flash[:notice] %></p>
>>
>> >    <table width="100%">
>> >        <tr>
>> >            <td>  <%= yield %>              </td>
>> >            <td>  <%= yield :sidebar %>  </td>
>> >        [snip]
>> > app\views\expenses\new.html.erb (at the bottom):
>> >        <% content_for :sidebar do %>
>> >          This is my sidebar stuff from:<br>
>> >            new.html.erb<br>
>> >            RTS\app\views\expenses
>> >        <% end %>
>>
>> I don't see where you are putting this in a div with id=sidebar.
>> Should you have
>>         <% content_for :sidebar do %>
>> <div id="sidebar">
>>           This is my sidebar stuff from:<br>
>>             new.html.erb<br>
>>             RTS\app\views\expenses
>> </div>
>>         <% end %>
>> or something similar?
>>
>> Colin
>
> --
> 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.

Read More…

[spree-user] Spree 0.8.4, where are the shipping charges added to the order summary

by rubyonrailsin 0 comments
As I step through the checkout, the order summary updates itself.
After I choose a shipping method (Active_Shipping), and click to the
next step, the shipping cost takes a little bit to update. Sometimes
it takes even up to the point that I have entered all the CC info.

IS there a way to have the shipping costs update the order summary
immediately once you click to the next step?

thanks

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Read More…

[Rails] Re: updated rails now missing rails gem

by rubyonrailsin 0 comments
Yup just wasted a good hour cursing monit and env variables.

This was the problem. Rack 1.0.1 works fine with thin so far.

On Feb 16, 2:51 pm, Mickael Faivre-Macon <li...@ruby-forum.com> wrote:
> Had the same problem.
> Thank you so much.
>
> Mickael.
>
> > and figured it out.
>
> > thin can't cope with rack 1.1.0.  uninstalled the rack 1.1.0 gem and all
> > is well again.
>
> --
> Posted viahttp://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-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.

Read More…

[Rails] Re: Sometimes losing decimal scale on mysql - ok on sqlite

by rubyonrailsin 0 comments
Owain wrote:
> rake RAILS_ENV=staging db:drop
> rake RAILS_ENV=staging db:create
> rake RAILS_ENV=staging db:migrate

RichardOnRails wrote:
> That's easier than the three-stage solution you used, though
> equivalent in effect I believe.

For what it's worth the "three-stage solution" can be done with one rake
task:
rake RAILS_ENV=staging db:migrate:reset

However, the change_column approach seems the safer and cleaner
solution. This technique keeps the migrations moving forward.

Given that dropping, recreating and migrating fixed your problem this
leads me to this question, "Was the precision and scale explicitly
configured in the migration before running the migrations?
--
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-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.

Read More…

[spree-user] Re: One-click Add to Cart

by rubyonrailsin 0 comments
We're looking for the same thing, I'd be interested in what you find
out.

On Mar 12, 1:41 pm, Dustin Friel <dfr...@gmail.com> wrote:
> I'm trying to implement a one click link that adds an item to a cart.
>
> I can see older code that did that, but it references Cart.
>
> Cart has been replaced with Order.
>
> Is there an easy way with the edge to achieve this?  Or do I need to
> add some custom logic to the Order controller?
>
> Thanks in advance.
>
> --
> Dustin Friel

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Read More…

Re: [spree-user] Re: Credit Card associated with User

by rubyonrailsin 0 comments
If you're going to store the credit card with the user (as opposed to
the order) then you should probably inform the user you're doing this
and then just associate with the user when its entered. I wouldn't
mine the payments looking for it - just keep it with user the whole
time. You'll probably want to keep an association with the payment as
well but the user association should occur whenever a new card is
entered and of course it should be updatable in my account or
whatever.

Sean Schofield

-------------------------------------------
Rails Dog LLC
2 Wisconsin Circle, Suite 700
Chevy Chase, MD 20815
voice: (301)560-2000
-------------------------------------------

On Wed, Mar 17, 2010 at 4:03 PM, Mike Totman <mike.totman@gmail.com> wrote:
> Ok, so how do I get the credit card info?  I'm a bit of a Rails
> newbie, I can't really navigate all the associations to figure out how
> to connect them.  It seems like I need to find an order associated
> with the user and then pull the payment information from that to get
> the credit card.  Is that right?  Any shortcuts I can use?
>
> Also, should I do this in the show.html.erb or in the
> users_controller.rb?
>
> On Mar 16, 4:48 pm, Sean Schofield <s...@railsdog.com> wrote:
>> What you're trying to do is perfectly fine.  We're looking at options
>> to associate the card with the user as part of the core since its such
>> a common use case.  We're doing it for a customer now, we'll probably
>> put it in the core once we've actually tested it out "in the wild"
>>
>> I'm really glad people are getting into the credit card profile stuff.
>>  Really cool possibilities flow from this!
>>
>> Sean Schofield
>>
>> -------------------------------------------
>> Rails Dog LLC
>> 2 Wisconsin Circle, Suite 700
>> Chevy Chase, MD 20815
>> voice: (301)560-2000
>> -------------------------------------------
>>
>>
>>
>> On Tue, Mar 16, 2010 at 6:45 PM, Mike Totman <mike.tot...@gmail.com> wrote:
>> > We're trying to modify the User/Account page so that it displays more
>> > information than the default.  Specifically, one of the things we want to
>> > show is the credit card associated with the user.  I think I read somewhere
>> > that this doesn't actually fit the model that Spree uses, that credit cards
>> > are onlyh associated with payments on orders.  Is this correct?  If so,
>> > should I perhaps get the most recent credit card used?  How would I get this
>> > info.
>>
>> > --
>> > Mike
>>
>> > --
>> > You received this message because you are subscribed to the Google Groups
>> > "Spree" group.
>> > To post to this group, send email to spree-user@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > spree-user+unsubscribe@googlegroups.com.
>> > For more options, visit this group at
>> >http://groups.google.com/group/spree-user?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "Spree" group.
> To post to this group, send email to spree-user@googlegroups.com.
> To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
>
>

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Read More…

[spree-user] Re: Credit Card associated with User

by rubyonrailsin 0 comments
Ok, so how do I get the credit card info? I'm a bit of a Rails
newbie, I can't really navigate all the associations to figure out how
to connect them. It seems like I need to find an order associated
with the user and then pull the payment information from that to get
the credit card. Is that right? Any shortcuts I can use?

Also, should I do this in the show.html.erb or in the
users_controller.rb?

On Mar 16, 4:48 pm, Sean Schofield <s...@railsdog.com> wrote:
> What you're trying to do is perfectly fine.  We're looking at options
> to associate the card with the user as part of the core since its such
> a common use case.  We're doing it for a customer now, we'll probably
> put it in the core once we've actually tested it out "in the wild"
>
> I'm really glad people are getting into the credit card profile stuff.
>  Really cool possibilities flow from this!
>
> Sean Schofield
>
> -------------------------------------------
> Rails Dog LLC
> 2 Wisconsin Circle, Suite 700
> Chevy Chase, MD 20815
> voice: (301)560-2000
> -------------------------------------------
>
>
>
> On Tue, Mar 16, 2010 at 6:45 PM, Mike Totman <mike.tot...@gmail.com> wrote:
> > We're trying to modify the User/Account page so that it displays more
> > information than the default.  Specifically, one of the things we want to
> > show is the credit card associated with the user.  I think I read somewhere
> > that this doesn't actually fit the model that Spree uses, that credit cards
> > are onlyh associated with payments on orders.  Is this correct?  If so,
> > should I perhaps get the most recent credit card used?  How would I get this
> > info.
>
> > --
> > Mike
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Spree" group.
> > To post to this group, send email to spree-user@googlegroups.com.
> > To unsubscribe from this group, send email to
> > spree-user+unsubscribe@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/spree-user?hl=en.

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Read More…

[spree-user] Re: New site and IE6 problems --> is Spree Edge not working there?

by rubyonrailsin 0 comments
IE6 hates png and it continues to pain web devs all over the world.
May you die soon IE6!!!

There are a few solutions that can fix some of the issues with IE6 and
PNG support.

http://labs.unitinteractive.com/unitpngfix.php

A more detailed explanation of the problem (if you want) here:
http://24ways.org/2007/supersleight-transparent-png-in-ie6

Word of caution: Dont go overboard with the number of pngs on a single
page. Alphaloader has performance implications on IE6.

Hope this helps!

On Mar 17, 9:19 pm, Alan Gutierrez <a...@blogometer.com> wrote:
> Paul Callaghan wrote:
>
> > On Thu, Mar 11, 2010 at 10:25 AM, liebana <carloslieb...@gmail.com
> > <mailto:carloslieb...@gmail.com>> wrote:
>
> >     I'm SO nice.... :)
>
> > thanks.
>
> > IE6 doesn't handle transparent images well (or at all?), though I think
> > there are some workarounds to try.
>
> IE 6 handles transparent gifs fine. It doesn't handle PNG alpha
> transparency. That is, it handles an image that has a single transparent
> color, but it can't handle transparent gradients.
>
> I've taken to removing drop shadows from images in IE 6, which makes the
> design flatter, but still functioning.
>
> Alan Gutierrezhttp://twitter.com/bigeasy

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Read More…

[spree-user] Re: User Personalisation of Products

by rubyonrailsin 0 comments
Can anyone tell me whether my personalisation_options should belong to
the product or the variant (or both)?

I'd imagine that I might want to specify different personalisation
options for each variant of a product, so it should belong to the
variant? Valid assumption?

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Read More…

[Rails] Re: Avoid web-service delay on an action

by rubyonrailsin 0 comments
Robert Walker wrote:
> Sound like an excellent use case for delay_job (or similar) to me.

Oops. I meant up type delayed_job...
--
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-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.

Read More…

[Rails] Re: Avoid web-service delay on an action

by rubyonrailsin 0 comments
Marcelo de Moraes Serpa wrote:
> In a controller action, there is a call to Twitter's update. While it
> works
> as expected, it indoubtedly added some delay to the action processing
> time.
> What I would like to do is push this twitter update to another thread or
> to
> the background.
>
> I know I could use one of the many queue processing engines around do to
> such thing, but it is for such a simple issue that I would like to ask
> for
> other's people wisdom before proceeding.

Sound like an excellent use case for delay_job (or similar) to me.
--
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-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.

Read More…

[Rails] Re: Passing a block to gsub

by rubyonrailsin 0 comments
Well, I finally figured it out, might as well post it just in case
anyone else is trying to do the same thing. Below is the code.

# converts @ signs into product links and category links
def product_description(product)
product.description.gsub(/@(\w+)/m) do |w|
if #{$1} =~ /p(.*)/
wp = Product.find_by_id("#{$1}".delete "p")
%{<a href="#{wp.permalink}">}
else
wt = Taxon.find_by_id("#{$1}".delete "t")
%{<a href="/t/#{wt.permalink.chop}">}
end
end
end

Pretty much what this allows me to do is I can take a text field and
automatically add links to words for example;

this is a test, this is a link to a @p30 product</a>, and this is a
link to a @t45 category</a>

That way it makes my admin views a little bit cleaner and eventually I
will add a rescue feature so if that product or category has been
deleted i wont have any broken links through out the site.

--
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.

Read More…

[Rails] Re: Problem with content-position and background-color in a sidebar

by rubyonrailsin 0 comments
> I don't see where you are putting this in a div with id=sidebar.
> Should you have
> <% content_for :sidebar do %>
> <div id="sidebar">
> This is my sidebar stuff from:<br>
> new.html.erb<br>
> RTS\app\views\expenses
> </div>
> <% end %>
> or something similar?

Here's what I've got:

In app\views\expenses\new.html.erb (at the bottom) I have:
<% content_for :sidebar do %>
This is my sidebar stuff from:<br>
new.html.erb<br>
RTS\app\views\expenses
<% end %>

Both divs are defined in app\views\layouts\standard.html.erb:
<body id="library">
<div id="container">
<div id="header">
<h1>Receipts Tracking System</h1>
<h3>Library powered by Ruby on Rails</h3>
</div>

<div id="content">
<%= yield -%>
</div>
<div id="sidebar">
<%= yield -%>
</div>
</div>
</body>
</html>

I just added that yield to div/sidebar based on no more than hot air.
I availed me naught.

On Mar 17, 1:18 pm, Colin Law <clan...@googlemail.com> wrote:
> On 17 March 2010 16:52, RichardOnRails
>
>
>
> <RichardDummyMailbox58...@uscomputergurus.com> wrote:
> >...
> > app\views\layouts\expenses.html.erb:
> > <body>
> >    <p style="color: green"><%= flash[:notice] %></p>
>
> >    <table width="100%">
> >        <tr>
> >            <td>  <%= yield %>              </td>
> >            <td>  <%= yield :sidebar %>  </td>
> >        [snip]
> > app\views\expenses\new.html.erb (at the bottom):
> >        <% content_for :sidebar do %>
> >          This is my sidebar stuff from:<br>
> >            new.html.erb<br>
> >            RTS\app\views\expenses
> >        <% end %>
>
> I don't see where you are putting this in a div with id=sidebar.
> Should you have
>         <% content_for :sidebar do %>
> <div id="sidebar">
>           This is my sidebar stuff from:<br>
>             new.html.erb<br>
>             RTS\app\views\expenses
> </div>
>         <% end %>
> or something similar?
>
> Colin

--
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.

Read More…

Re: [Radiant-Dev] i18n merged in

by rubyonrailsin 0 comments
Great news!

Congrats to all those involved :)

On Wed, Mar 17, 2010 at 7:06 PM, Jim Gay <jim@saturnflyer.com> wrote:
Development just got slightly more complicated, but much more language friendly.

The i18n branch has been merged with master.

Please be sure, when adding features and fixing bugs that you account for any strings in the locale translation files.

Many thanks to Keith Bingman who got the ball rolling.
There were no credits in the i18n branch, so if you've contributed code or a translation please reply back and I'll updated the names.


Jim Gay
http://www.saturnflyer.com




--
Radiant CMS Dev Mailing List
Post:        radiantcms-dev@googlegroups.com
Unsubscribe: radiantcms-dev-unsubscribe@googlegroups.com
Group Site:  http://groups.google.com/group/radiantcms-dev/



--
----------------------------------------------
http://cenatus.org/
http://radialsolutions.co.uk/
----------------------------------------------

--
Radiant CMS Dev Mailing List
Post: radiantcms-dev@googlegroups.com
Unsubscribe: radiantcms-dev-unsubscribe@googlegroups.com
Group Site: http://groups.google.com/group/radiantcms-dev/
Read More…

[Radiant-Dev] i18n merged in

by rubyonrailsin 0 comments
Development just got slightly more complicated, but much more language friendly.

The i18n branch has been merged with master.

Please be sure, when adding features and fixing bugs that you account for any strings in the locale translation files.

Many thanks to Keith Bingman who got the ball rolling.
There were no credits in the i18n branch, so if you've contributed code or a translation please reply back and I'll updated the names.


Jim Gay
http://www.saturnflyer.com


--
Radiant CMS Dev Mailing List
Post: radiantcms-dev@googlegroups.com
Unsubscribe: radiantcms-dev-unsubscribe@googlegroups.com
Group Site: http://groups.google.com/group/radiantcms-dev/

Read More…

[Rails] Re: Problem with content-position and background-color in a sidebar

by rubyonrailsin 0 comments
Colin,

> Is this the <div id=sidebar> that we are talking about?
Yes!

>Expand the td and select the div id=sidebar that should be there I
> think. Then you should see the style from style.css
*** You're onto something! ***

In the Firebug pane, with the 2nd td expanded, when I bring the
cursor over:
body => teal (all except the top couple of debugging output, that are
exempt from subsequent mention)
<div> => all white
<link> => all white
<p> => all white
<table> => all teal
<tbody> => all teal
<tr> => all teal
<td> left-half => all teal
<td> right-half => all teal
(text) => all teal


That looks to me like the sidebar background-color spec is being
subordinated to the main-page spec or .... I have no idea.

Best wishes,
Richard


On Mar 17, 1:08 pm, Colin Law <clan...@googlemail.com> wrote:
> On 17 March 2010 16:52, RichardOnRails
>
>
>
> <RichardDummyMailbox58...@uscomputergurus.com> wrote:
> > Hey Colin and Michael,
>
> > Thanks to both of you for your responses.
>
> >> Assuming you have "<div id="sidebar"><%= yield :sidebar %></div>"
> > somewhere in your view... [Michael]
>
> > Sidebar is referenced in three file the app (according to my Ruby
> > Search.rb program):
> > app\views\layouts\standard.html.erb:
> >    <body id="library">
> >        <div id="container">
> >            <div id="header">
> >                <h1>Receipts Tracking System</h1>
> >                <h3>Library powered by Ruby on Rails</h3>
> >            </div>
>
> >            <div id="content">
> >                <%= yield -%>
> >            </div>
> >            <div id="sidebar"></div>
> >        [snip]
> > app\views\layouts\expenses.html.erb:
> > <body>
> >    <p style="color: green"><%= flash[:notice] %></p>
>
> >    <table width="100%">
> >        <tr>
> >            <td>  <%= yield %>              </td>
> >            <td>  <%= yield :sidebar %>  </td>
> >        [snip]
> > app\views\expenses\new.html.erb (at the bottom):
> >        <% content_for :sidebar do %>
> >          This is my sidebar stuff from:<br>
> >            new.html.erb<br>
> >            RTS\app\views\expenses
> >        <% end %>
>
> >> This doesn't appear to be a rails issue at all [Colin}:
>
> > I opened Firebug when "New Expenses", the offending page, was being
> > displayed in Firefox.
> > Fiirebug referenced  Scaffold.css 3 times.  But style.css wsas never
> > mentioned, which is where the following definition is given:
>
> I presume you have included style.css?  Assuming that it is in
> public/stylesheets then you should have
>   <%= stylesheet_link_tag 'style' %>
> in the header.  Check in View, Page Source to see if it is there and
> looks correct.  In the html it should reference /stylesheets/style.css
>  (with leading /).
>
>
>
>
>
> > div#sidebar {
> >   width: 200px;
> >   margin-left: 480px;
> >   background-color: #00FFFF;
> > }
>
> > Does that point to an error in my code?
>
> > Regards,
> > Richard
>
> > The gory details from Firebug follow:
>
> > In the left-hand pane:
> > body
> >        div (not expanded)
> >        link (")
> >        table
> >                tbody
> >                        tr
> >                                td (My page's left side, not expanded)
> >                                td (My page's right side = "sidebar", not expanded)
>
> Is this the <div id=sidebar> that we are talking about?
>
>
>
> >                        /tr
> >                /tbody
> >        /table
> >        div id = divCleekiAttrib (other stuff)
> >        /div
> > /body
>
> > Except for the last div, that structure matches my expenses,html.erb:
> >        <body>
> >            <p style="color: green"><%= flash[:notice] %></p>
>
> >            <table width="100%">
> >                <tr>
> >                    <td>  <%= yield %>              </td>
> >                    <td>  <%= yield :sidebar %>  </td>
> >                </tr>
> >            </table>
> >        </body>
>
> > So far, so good.
>
> > But with the focus on the 2nd td in the left-hand pane,
>
> Expand the td and select the div id=sidebar that should be there I
> think.  Then you should see the style from style.css
>
> Colin

--
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.

Read More…

[Rails] Avoid web-service delay on an action

by rubyonrailsin 0 comments
Hello all,

In a controller action, there is a call to Twitter's update. While it works as expected, it indoubtedly added some delay to the action processing time. What I would like to do is push this twitter update to another thread or to the background.

I know I could use one of the many queue processing engines around do to such thing, but it is for such a simple issue that I would like to ask for other's people wisdom before proceeding.

Any suggestions appreciated.

Thanks,

Marcelo.

--
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.
Read More…

[Rails] rails+prawnto: setting :type to :prawn in a #render_to_string call not working

by rubyonrailsin 0 comments
Hello, my question is rails related though it is also somewhat
specific to the prawnto plugin (installed latest version as of
2010-03-15). I would ask on a prawnto forum/list if I knew where one
was.

Anyhow, I'm using rails 2.3.5 (with ruby 1.8.6 patchlevel 111) in an
app that is successfully using the prawnto gem (with the prawn gem
version 0.7.1). I've got a a WorksheetsController with the standard
scaffold actions (and associated routes). I was able to drop in a
"show.pdf.prawn" file into the associated view directory, write some
prawn code in it, and add a "format.pdf { render :layout => false }"
line inside the #show method's "respond_to" block. After doing this I
could "view" my worksheets as PDF documents by adding a ".pdf"
extension/type-definition to the end of the url:

http://localhost/worksheets/1.pdf

This is great. However, now I need to add a feature where someone can
request that I email them a PDF copy of a worksheet. In the interest
of being DRY, I want to re-use all the prawn pdf generation code in my
"show.pdf.prawn" view file. After poking around, I figured
#render_to_string might do the job.

The "email request" is implemented as the #email method/action in my
controller. After grabbing the @worksheet object, I attempt to render
the PDF as follows:

worksheet = render_to_string :action => "show", :layout =>
false, :type => :prawn

The #email action is always called via AJAX. Also, I have some AJAX
stuff implemented for the #show action as show.rjs. The
#render_to_string always renders the show action's RJS template,
ignoring the :type => :prawn setting.

So, clearly I have a misunderstanding #render_to_string. I'm also
wondering if there is a better way to accomplish what I need to do.

Any ideas?

--
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.

Read More…

[Rails] Paperclip upload over local network

by rubyonrailsin 0 comments
Hello,

I am using the Paperclip plugin in one of my rails applications. It
has been working absolutely fine so far on my local PC.

Recently, I ported the application onto a LAN. I need the image
uploading to be possible over the local network.

Are there any changes to be done in paperclip for it (I don't think
so, but am not sure)? Should paperclip work seemlessly as good on the
local network as it does on a local PC?

Any suggestions are welcome!

Thanks.

love-n-peace,
@shaan
'Aal izz 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.

Read More…

Re: [Rails] Associating a default paperclip image from a different model

by rubyonrailsin 0 comments
On 17 March 2010 17:29, bingo bob <lists@ruby-forum.com> wrote:
> Here's some code, this is my NewsItem model as you can see...
>
> class NewsItem < ActiveRecord::Base
>  belongs_to :country
>  has_attached_file :image, :styles => { :original => '57x57' },
> :default_url => '/images/football.png'
>
>  #   has_attached_file :image,
>  #                     :styles => { :original => '57x57' },
>  #                     :default_url => self.country.flag.url
>
>  validates_attachment_content_type :image, :content_type =>
> ['image/png'], :message => "only pngs are allowed."
>  validates_presence_of :title
>  validates_length_of :title, :within => 3..50
>  validates_presence_of :url
> end
>
> I have a Country model also which has a flag (paperclip attached
> image)...What I'd like to do is make the default image for the NewsItem
> be the Country flag? My commented out code shows my unsuccessful
> attempt, I believe it's along those lines, but not what I have!

What was the result of your code? Was it a syntax error or run time?

Colin

--
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.

Read More…

[Rails] Associating a default paperclip image from a different model

by rubyonrailsin 0 comments
Here's some code, this is my NewsItem model as you can see...

class NewsItem < ActiveRecord::Base
belongs_to :country
has_attached_file :image, :styles => { :original => '57x57' },
:default_url => '/images/football.png'

# has_attached_file :image,
# :styles => { :original => '57x57' },
# :default_url => self.country.flag.url

validates_attachment_content_type :image, :content_type =>
['image/png'], :message => "only pngs are allowed."
validates_presence_of :title
validates_length_of :title, :within => 3..50
validates_presence_of :url
end

I have a Country model also which has a flag (paperclip attached
image)...What I'd like to do is make the default image for the NewsItem
be the Country flag? My commented out code shows my unsuccessful
attempt, I believe it's along those lines, but not what I have!
--
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-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.

Read More…

[Rails] Re: How do I determine the "source" action for conditionally rendering error actions and validation messages?

by rubyonrailsin 0 comments
On Mar 17, 12:06 pm, Colin Law <clan...@googlemail.com> wrote:
> On 17 March 2010 15:55, Michael Pavling <pavl...@gmail.com> wrote:
>
>
>
>
>
> > On 17 March 2010 15:41, Clay H. <cchea...@gmail.com> wrote:
> >> How do I either:
> >> 1) Detect which action/view/template sent the user to the create
> >> action, so that I can conditionally return them to the proper action
> >> using render?
>
> >> or
>
> >> 2) Use redirect_to(:back) and still show the validation errors?
>
> > The RESTful way is to have a "dispense_stock" controller - which has
> > its own methods.
>
> > The cheaty (smelly) way is to put a hidden field in the form or an
> > extra querystring parameter with with the value "new" or "dispense",
> > and check the params hash for the value.
>
> Whether this is smelly or not really depends on how similar the two
> actions are.  As I understand it they both create a new record in the
> same table, so it _could_ be virtually (or even completely) odour free
> to use the same action and determine the details of what to do based
> on parameters (it may not even be necessary to add a new parameter, it
> may be implicitly clear from existing parameters).  On the other hand
> I agree that route could cause an offensive effluvia to exuded.  It
> all depends on the detail.
>
> Colin

Both of your comments were helpful and led to me to consider how I
could check the form elements to determine where to send them upon
validation failure. It ain't restful and probably smells quite
unpleasant, but it seems to work. I'll keep an eye on it and improve
the structure once I've straightened up some other issues. 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.

Read More…

Re: [Rails] Re: Problem with content-position and background-color in a sidebar

by rubyonrailsin 0 comments
On 17 March 2010 16:52, RichardOnRails
<RichardDummyMailbox58407@uscomputergurus.com> wrote:
>...
> app\views\layouts\expenses.html.erb:
> <body>
>    <p style="color: green"><%= flash[:notice] %></p>
>
>    <table width="100%">
>        <tr>
>            <td>  <%= yield %>              </td>
>            <td>  <%= yield :sidebar %>  </td>
>        [snip]
> app\views\expenses\new.html.erb (at the bottom):
>        <% content_for :sidebar do %>
>          This is my sidebar stuff from:<br>
>            new.html.erb<br>
>            RTS\app\views\expenses
>        <% end %>

I don't see where you are putting this in a div with id=sidebar.
Should you have
<% content_for :sidebar do %>
<div id="sidebar">
This is my sidebar stuff from:<br>
new.html.erb<br>
RTS\app\views\expenses
</div>
<% end %>
or something similar?

Colin

--
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.

Read More…

[Rails] Re: Problem with content-position and background-color in a sidebar

by rubyonrailsin 0 comments
Woops,

Missed 1 file that mentioned "sidebar" (because I only searched in
files with name matching /erb|rb|rjs/):

public\stylesheets\style.css

Apologies,
Richard

On Mar 17, 10:54 am, Michael Pavling <pavl...@gmail.com> wrote:
> On 17 March 2010 14:43, Colin Law <clan...@googlemail.com> wrote:
>
> >> Problem: My page displays the sidebar to the right side as I intend,
> >> but:
> >> -       It displays the sidebar's content as intend ... almost: that is, the
> >> text appear centered vertically rather than on top
> >> -       It continues to have a lily-white background.
>
> > This doesn't appear to be a rails issue at all. However, install the
> > Firebug pludin for Firefox and then you can inspect the div and see
> > what it's style is and where those styles are inherited from.
>
> +1
>
> This is a CSS problem, not Rails [1]. Probably a 'float' or 'display'
> property that needs to be tweaked.
>
> [1] Assuming you have "<div id="sidebar"><%= yield :sidebar %></div>"
> somewhere in your view...

--
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.

Read More…

Re: [Rails] Re: Problem with content-position and background-color in a sidebar

by rubyonrailsin 0 comments
On 17 March 2010 16:52, RichardOnRails
<RichardDummyMailbox58407@uscomputergurus.com> wrote:
> Hey Colin and Michael,
>
> Thanks to both of you for your responses.
>
>> Assuming you have "<div id="sidebar"><%= yield :sidebar %></div>"
> somewhere in your view... [Michael]
>
> Sidebar is referenced in three file the app (according to my Ruby
> Search.rb program):
> app\views\layouts\standard.html.erb:
>    <body id="library">
>        <div id="container">
>            <div id="header">
>                <h1>Receipts Tracking System</h1>
>                <h3>Library powered by Ruby on Rails</h3>
>            </div>
>
>            <div id="content">
>                <%= yield -%>
>            </div>
>            <div id="sidebar"></div>
>        [snip]
> app\views\layouts\expenses.html.erb:
> <body>
>    <p style="color: green"><%= flash[:notice] %></p>
>
>    <table width="100%">
>        <tr>
>            <td>  <%= yield %>              </td>
>            <td>  <%= yield :sidebar %>  </td>
>        [snip]
> app\views\expenses\new.html.erb (at the bottom):
>        <% content_for :sidebar do %>
>          This is my sidebar stuff from:<br>
>            new.html.erb<br>
>            RTS\app\views\expenses
>        <% end %>
>
>
>
>> This doesn't appear to be a rails issue at all [Colin}:
>
> I opened Firebug when "New Expenses", the offending page, was being
> displayed in Firefox.
> Fiirebug referenced  Scaffold.css 3 times.  But style.css wsas never
> mentioned, which is where the following definition is given:

I presume you have included style.css? Assuming that it is in
public/stylesheets then you should have
<%= stylesheet_link_tag 'style' %>
in the header. Check in View, Page Source to see if it is there and
looks correct. In the html it should reference /stylesheets/style.css
(with leading /).

>
> div#sidebar {
>   width: 200px;
>   margin-left: 480px;
>   background-color: #00FFFF;
> }
>
> Does that point to an error in my code?
>
> Regards,
> Richard
>
> The gory details from Firebug follow:
>
> In the left-hand pane:
> body
>        div (not expanded)
>        link (")
>        table
>                tbody
>                        tr
>                                td (My page's left side, not expanded)
>                                td (My page's right side = "sidebar", not expanded)

Is this the <div id=sidebar> that we are talking about?

>                        /tr
>                /tbody
>        /table
>        div id = divCleekiAttrib (other stuff)
>        /div
> /body
>
> Except for the last div, that structure matches my expenses,html.erb:
>        <body>
>            <p style="color: green"><%= flash[:notice] %></p>
>
>            <table width="100%">
>                <tr>
>                    <td>  <%= yield %>              </td>
>                    <td>  <%= yield :sidebar %>  </td>
>                </tr>
>            </table>
>        </body>
>
> So far, so good.
>
> But with the focus on the 2nd td in the left-hand pane,

Expand the td and select the div id=sidebar that should be there I
think. Then you should see the style from style.css

Colin

--
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.

Read More…

[Rails] Re: Problem with content-position and background-color in a sidebar

by rubyonrailsin 0 comments
Hey Colin and Michael,

Thanks to both of you for your responses.

> Assuming you have "<div id="sidebar"><%= yield :sidebar %></div>"
somewhere in your view... [Michael]

Sidebar is referenced in three file the app (according to my Ruby
Search.rb program):
app\views\layouts\standard.html.erb:
<body id="library">
<div id="container">
<div id="header">
<h1>Receipts Tracking System</h1>
<h3>Library powered by Ruby on Rails</h3>
</div>

<div id="content">
<%= yield -%>
</div>
<div id="sidebar"></div>
[snip]
app\views\layouts\expenses.html.erb:
<body>
<p style="color: green"><%= flash[:notice] %></p>

<table width="100%">
<tr>
<td> <%= yield %> </td>
<td> <%= yield :sidebar %> </td>
[snip]
app\views\expenses\new.html.erb (at the bottom):
<% content_for :sidebar do %>
This is my sidebar stuff from:<br>
new.html.erb<br>
RTS\app\views\expenses
<% end %>

> This doesn't appear to be a rails issue at all [Colin}:

I opened Firebug when "New Expenses", the offending page, was being
displayed in Firefox.
Fiirebug referenced Scaffold.css 3 times. But style.css wsas never
mentioned, which is where the following definition is given:

div#sidebar {
width: 200px;
margin-left: 480px;
background-color: #00FFFF;
}

Does that point to an error in my code?

Regards,
Richard

The gory details from Firebug follow:

In the left-hand pane:
body
div (not expanded)
link (")
table
tbody
tr
td (My page's left side, not expanded)
td (My page's right side = "sidebar", not expanded)
/tr
/tbody
/table
div id = divCleekiAttrib (other stuff)
/div
/body

Except for the last div, that structure matches my expenses,html.erb:
<body>
<p style="color: green"><%= flash[:notice] %></p>

<table width="100%">
<tr>
<td> <%= yield %> </td>
<td> <%= yield :sidebar %> </td>
</tr>
</table>
</body>

So far, so good.

But with the focus on the 2nd td in the left-hand pane,
the right-hand pane shows two items:
First:
body, p, ol, ul, td { [scaffo...6718330 (line 3)]
font-family:verdana,arial,helvetica,sans-serif;
font-size:13px;
line-height:18px;
}

Second (two "body" items "inherited from body"):: [scaffo...6718330
(line 3)]
body, p, ol, ul, td {
font-family:verdana,arial,helvetica,sans-serif; [crossed out]
font-size:13px; [crossed out]
line-height:18px; [crossed out]
}

body { [scaffo...6718330 (line 1)]
color:#333333;
}

On Mar 17, 10:54 am, Michael Pavling <pavl...@gmail.com> wrote:
> On 17 March 2010 14:43, Colin Law <clan...@googlemail.com> wrote:
>
> >> Problem: My page displays the sidebar to the right side as I intend,
> >> but:
> >> -       It displays the sidebar's content as intend ... almost: that is, the
> >> text appear centered vertically rather than on top
> >> -       It continues to have a lily-white background.
>
> > This doesn't appear to be a rails issue at all. However, install the
> > Firebug pludin for Firefox and then you can inspect the div and see
> > what it's style is and where those styles are inherited from.
>
> +1
>
> This is a CSS problem, not Rails [1]. Probably a 'float' or 'display'
> property that needs to be tweaked.
>
> [1] Assuming you have "<div id="sidebar"><%= yield :sidebar %></div>"
> somewhere in your view...

--
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.

Read More…

Re: [Rails] Re: Recommendations for pdf generators

by rubyonrailsin 0 comments

On 17 Mar 2010, at 15:47, Florent2 wrote:

  i have googled around for some pdf generators. Found
1) PDF::Writer which is a little dated
2) Rupdf (http://scoop.simplyexcited.co.uk//2007/12/15/rupdf-simple-
ruby-pdf-rails-plugin/ andhttp://agilewebdevelopment.com/plugins/rupdf)
- it's a little dated. Last revision was on 15th of Dec, 2007.

Any recommendations for pdf generators?

wkhtmltopdf: http://code.google.com/p/wkhtmltopdf/
Rails plugin: http://github.com/mileszs/wicked_pdf

you can generate PDF from HTML templates with CSS styling

Indeed a very promising project, but way behind on PrinceXML, so it depends on your budget and requirements in the end which one you choose. Also wkhtmltopdf is very memory hungry as far as I remember. That said, it's a pretty active project, so it's definitely something to keep an eye on.


Best regards


Peter De Berdt


Read More…

[spree-user] Re: CSS in theme_default not taking effect?

by rubyonrailsin 0 comments
Answer: Run rake spree:dev:less and restart your app.

On Mar 17, 4:28 pm, nikimere <nikim...@gmail.com> wrote:
> Ok i've just read a few threads, i see they were talking about making
> the Less optional. I presume this has been done? Is there a rake task
> for compiling a new screen.css from the Less files?
>
> Niki
>
> On Mar 17, 3:49 pm, nikimere <nikim...@gmail.com> wrote:
>
> > Hi,
>
> > I've just installed 0.10.1 and i'm making changes to the theme_default
> > CSS.
> > None of my changes are taking effect....?
> > There is a screen.css file in /public/stylesheets, is the dynamically
> > created from the .less files? I've tried deleting that but then no CSS
> > file is loaded.
>
> > Can anyone shed some light?
>
> > Regards,
> > Niki

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Read More…

[spree-user] Re: CSS in theme_default not taking effect?

by rubyonrailsin 0 comments
Ok i've just read a few threads, i see they were talking about making
the Less optional. I presume this has been done? Is there a rake task
for compiling a new screen.css from the Less files?

Niki

On Mar 17, 3:49 pm, nikimere <nikim...@gmail.com> wrote:
> Hi,
>
> I've just installed 0.10.1 and i'm making changes to the theme_default
> CSS.
> None of my changes are taking effect....?
> There is a screen.css file in /public/stylesheets, is the dynamically
> created from the .less files? I've tried deleting that but then no CSS
> file is loaded.
>
> Can anyone shed some light?
>
> Regards,
> Niki

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Read More…

Re: [Rails] How do I determine the "source" action for conditionally rendering error actions and validation messages?

by rubyonrailsin 0 comments
On 17 March 2010 16:06, Colin Law <clanlaw@googlemail.com> wrote:
>> The RESTful way is to have a "dispense_stock" controller - which has
>> its own methods.
>>
>> The cheaty (smelly) way is to put a hidden field in the form or an
>> extra querystring parameter with with the value "new" or "dispense",
>> and check the params hash for the value.
>
> Whether this is smelly or not really depends on how similar the two
> actions are.

Don't get me wrong - I wasn't saying *don't* use a hidden param - I
was suggesting it as a perfectly acceptable option... it's just that I
know the REST police will jump on you if you're not careful.
To be honest, in lots of situations, the quick, easy (dirty?) way is
best *because* it's quick and easy.

And you're right; it may be perfectly possible to design the form to
use the same, restful action, and please everybody :-)

--
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.

Read More…

Re: [spree-user] Re: New site and IE6 problems --> is Spree Edge not working there?

by rubyonrailsin 0 comments
Paul Callaghan wrote:
>
>
> On Thu, Mar 11, 2010 at 10:25 AM, liebana <carlosliebana@gmail.com
> <mailto:carlosliebana@gmail.com>> wrote:
>
> I'm SO nice.... :)
>
>
> thanks.
>
> IE6 doesn't handle transparent images well (or at all?), though I think
> there are some workarounds to try.


IE 6 handles transparent gifs fine. It doesn't handle PNG alpha
transparency. That is, it handles an image that has a single transparent
color, but it can't handle transparent gradients.

I've taken to removing drop shadows from images in IE 6, which makes the
design flatter, but still functioning.

Alan Gutierrez
http://twitter.com/bigeasy

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Read More…

Re: [Rails] How do I determine the "source" action for conditionally rendering error actions and validation messages?

by rubyonrailsin 0 comments
On 17 March 2010 15:55, Michael Pavling <pavling@gmail.com> wrote:
> On 17 March 2010 15:41, Clay H. <ccheaton@gmail.com> wrote:
>> How do I either:
>> 1) Detect which action/view/template sent the user to the create
>> action, so that I can conditionally return them to the proper action
>> using render?
>>
>> or
>>
>> 2) Use redirect_to(:back) and still show the validation errors?
>>
>
> The RESTful way is to have a "dispense_stock" controller - which has
> its own methods.
>
> The cheaty (smelly) way is to put a hidden field in the form or an
> extra querystring parameter with with the value "new" or "dispense",
> and check the params hash for the value.

Whether this is smelly or not really depends on how similar the two
actions are. As I understand it they both create a new record in the
same table, so it _could_ be virtually (or even completely) odour free
to use the same action and determine the details of what to do based
on parameters (it may not even be necessary to add a new parameter, it
may be implicitly clear from existing parameters). On the other hand
I agree that route could cause an offensive effluvia to exuded. It
all depends on the detail.

Colin

--
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.

Read More…

[Rails] (JOB) Ruby / Erlang Developer (Cape Town, South Africa)

by rubyonrailsin 0 comments
Opportunity to join an international team of developers. Position
based in Cape Town.

You will be working with a team of highly skilled and experienced RUBY
on RAILS and ERLANG developers on a range of hosted mobile interactive
applications. They have rapidly grown over the last five years and
recently won several awards for its innovative and high-performance
products and is now de-facto market leader for mobile interactive
applications for the media industry.
They are strong believers in open source technologies and AGILE/XP
delivery methodologies. They passionately practice test-driven
development.
They are now looking to expand their team and need your expertise to
help them with their existing and new Ruby and Perl or Erlang
applications. Their backend applications need to be performed under
load and be robust and scalable. Their user interfaces need to not
only look appealing and reflect their brand values but are also need
to be intuitive and user friendly and provide optimal usability for
the application's core purpose

Travel Requirements
You are expected to have a valid passport and will, upon joining,
immediately travel to the UK for a period of 1-2 weeks. Passport visa
will be applied for at time of offer acceptance. Beyond this initial
induction short trips maybe required on a 6 monthly basis.

Required Skills

Skill Mandatory/Beneficial Years
Used
Ruby on Rails or Erlang Mandatory 3+ years
AGILE or SCRUM Methodologies Mandatory 1+ years
OOPS Mandatory 4+
years
MySQL Mandatory 3+
years
UNIX/LINUX Mandatory 4+ years


Required Experience
Good working knowledge of the Ruby command set and the model-view-
controller approach are essential. You may not yet have had the
opportunity to practice your Erlang skills commercially, but we expect
a passionate interest and understanding of Erlang. A passionate
appreciation for the AGILE development approach is also key to this
role.

Ideally you would have worked with plug-ins and have some experience
with methods to push Rails performance.

Required Education
You require a degree in computer sciences with a grade equivalent to
the UK's 2.1 or better.


Looking forward to hearing from you: sandra.butler@quickstartglobal.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-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.

Read More…

Re: [Rails] How do I determine the "source" action for conditionally rendering error actions and validation messages?

by rubyonrailsin 0 comments
On 17 March 2010 15:41, Clay H. <ccheaton@gmail.com> wrote:
> How do I either:
> 1) Detect which action/view/template sent the user to the create
> action, so that I can conditionally return them to the proper action
> using render?
>
> or
>
> 2) Use redirect_to(:back) and still show the validation errors?
>

The RESTful way is to have a "dispense_stock" controller - which has
its own methods.

The cheaty (smelly) way is to put a hidden field in the form or an
extra querystring parameter with with the value "new" or "dispense",
and check the params hash for the value.

--
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.

Read More…

Re: [Rails] How do I determine the "source" action for conditionally rendering error actions and validation messages?

by rubyonrailsin 0 comments
On 17 March 2010 15:41, Clay H. <ccheaton@gmail.com> wrote:
> I have a model called Stock.rb. I created an additional action, called
> dispense, in the controller so that I could render two different views
> based on the type of data entry being done. The "new" action is used
> for "adding stock" and the "dispense" action is used for "dispensing
> stock."
>
> They are very similar, but use different form partials to remove
> fields that could potentially cause confusion. Both actions use the
> "create" action when submitted.

Not answering your question directly, but you might considered an
alternative approach, which is to use the 'new' action for both adding
and dispensing, with a parameter in the url to indicate which is
required (or possibly you can already tell which action is required by
examining the existing parameters). You say the two actions are very
similar so this might make for less code and would solve the problem
you are having with the render I think.

Colin

>
> Stock.rb contains
> validates_presence_of :medicine_id, :route_id
>
> stocks_controller.rb contains
>
>  def create
>    @stock = Stock.new(params[:stock])
>    @routes = Route.find(:all, :capitalize, :order => :name)
>    @medicines = Medicine.find(:all, :capitalize, :order => :name)
>    if @stock.save
>      flash[:notice] = "Success | Sucesso | Éxito | Réussi"
>      redirect_to(:back)
>    else
>      flash[:error] = "You must select a medicine and a route."
>      redirect_to(:back)
>      #render :action => 'new'
>    end
>  end
>
> Each of the form partials contains
> <%= f.error_messages %>
> so that validation errors are shown at the top of the form if the user
> fails to select a medicine or a route.
>
> The problem I'm having is that the validation error messages are only
> shown when using render.
> render :action => 'new' shows the error messages, but if the user
> comes to this from the "dispense" action, they are returned to the
> form for the "new" action, which is used for a different purpose.
>
> I changed the code to redirect_to(:back), which returns the user to
> the proper form, but doesn't show the validation error message -- only
> the flash[:error] message that I inserted.
>
> How do I either:
> 1) Detect which action/view/template sent the user to the create
> action, so that I can conditionally return them to the proper action
> using render?
>
> or
>
> 2) Use redirect_to(:back) and still show the validation errors?
>
> --
> 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.

Read More…

[spree-user] CSS in theme_default not taking effect?

by rubyonrailsin 0 comments
Hi,

I've just installed 0.10.1 and i'm making changes to the theme_default
CSS.
None of my changes are taking effect....?
There is a screen.css file in /public/stylesheets, is the dynamically
created from the .less files? I've tried deleting that but then no CSS
file is loaded.

Can anyone shed some light?

Regards,
Niki

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Read More…

[Rails] How do I determine the "source" action for conditionally rendering error actions and validation messages?

by rubyonrailsin 0 comments
I have a model called Stock.rb. I created an additional action, called
dispense, in the controller so that I could render two different views
based on the type of data entry being done. The "new" action is used
for "adding stock" and the "dispense" action is used for "dispensing
stock."

They are very similar, but use different form partials to remove
fields that could potentially cause confusion. Both actions use the
"create" action when submitted.

Stock.rb contains
validates_presence_of :medicine_id, :route_id

stocks_controller.rb contains

def create
@stock = Stock.new(params[:stock])
@routes = Route.find(:all, :capitalize, :order => :name)
@medicines = Medicine.find(:all, :capitalize, :order => :name)
if @stock.save
flash[:notice] = "Success | Sucesso | Éxito | Réussi"
redirect_to(:back)
else
flash[:error] = "You must select a medicine and a route."
redirect_to(:back)
#render :action => 'new'
end
end

Each of the form partials contains
<%= f.error_messages %>
so that validation errors are shown at the top of the form if the user
fails to select a medicine or a route.

The problem I'm having is that the validation error messages are only
shown when using render.
render :action => 'new' shows the error messages, but if the user
comes to this from the "dispense" action, they are returned to the
form for the "new" action, which is used for a different purpose.

I changed the code to redirect_to(:back), which returns the user to
the proper form, but doesn't show the validation error message -- only
the flash[:error] message that I inserted.

How do I either:
1) Detect which action/view/template sent the user to the create
action, so that I can conditionally return them to the proper action
using render?

or

2) Use redirect_to(:back) and still show the validation errors?

--
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.

Read More…

[Rails] Re: Re: Writing a large file with Spreadsheet: very slow, any HELP?

by rubyonrailsin 0 comments
David Chua wrote:
> I hope you're sending those tasks to a background worker...

Not yet, but that's probably the route I'll be going.
--
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-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.

Read More…

[Rails] bundler 0.9.x and rails 2.3.5 problem

by rubyonrailsin 0 comments
Hi all!

A simple question to you pros, is it possible to make autoinstall of
gems when rails application is run (on mongrel1.1.5)? This was my
intention when I today started to look at bundler, but until now it has
only proven to me to just be able to install gems from Gemfile manually
with "bundle install". I have not managed to do anything more then this.

If it is possible, please give me a clue on how to do it.
I have tried with modifying boot.rb
creating preinitializer.rb with load paths
etc but it hasnt been so successful because among other things bundler's
environment.rb doesnt even get created when running bundler install
command. Do you know how to solve this issue?


Thank you for your time,
Kind regards,
jessy
--
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-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.

Read More…

Re: [Rails] Re: Writing a large file with Spreadsheet: very slow, any HELP?

by rubyonrailsin 0 comments
I hope you're sending those tasks to a background worker...

On Wed, Mar 17, 2010 at 8:54 PM, Joe Peck <lists@ruby-forum.com> wrote:
Joe Peck wrote:
> Hey,
>
> I'm using the Spreadsheet gem to generate Excel files.  It's worked
> great up until now.
>
> I'm trying to put 25,000 rows in a sheet, then doing book.write to write
> the file.  It's really slow, like 3-4 minutes.
>
> Is there a way to write groups of rows to a sheet at a time, or some
> other way to speed up this process?  Thanks in advance for any advice.

Oh yeah, I'm using the latest Spreadsheet gem, 0.6.4.1 if that makes a
difference.  Any thoughts on how to speed up the writing process?
--
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-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.
Read More…

[Rails] Re: Re: Email using ruby on rails

by rubyonrailsin 0 comments
You'll also want to change the address and domain to fit your
needs. If you don't know, ask your IT department, or your ISP, or your
webhost.

Sir for your above mentioned thing well is it necessary to know the
domain and address from my ISP??
i cant send an email from my application without this..
Also i would like to mention that the email information is displayed in
the web server but it is not routed to the mentioned email address..so
wat should i do?
--
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-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.

Read More…

Subscribe feeds via e-mail

Blog Archive